THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net


S U M M A R Y


DIARY: March 4, 2006 09:19 AM Saturday; Rod Welch

Pkzip transfer commands to new program for SDS.

1...Summary/Objective
2...Zip File Operation Seems to Be Changing Date of Files
3...Pkzipc Switched Commands Apply Attribute Times Command Consistently
4...Backup Interim Transfers Between Computers Pkzip Configure Failing
5...Date Command Pkzipc Applies Date Format from Windows XP
6...Backup Files Pkzipc.exe Transfer Between Computers Replicate Content
7...T11.cmd Transfer Files Between Computers to Replicate Work Setting
8...Replicate Work Setting T11.bat Transfer Files Between Computers
9...Transfer Files Between Computers to Replicate Work Setting T11.bat
10...Rcv.cmd Pkzipc Extract Files for Transfer Backed Up with Pkzipc.exe
11...Tgj.bat Transfer Files to Gary
12...Modify Interim Backup Code to Apply Pkzipc Backup.cmd and 03101
13...Backup.cmd Modify Apply Pkzipc for Daily Backup with SDS Launch
....03101 Modify to Post New Structure Using Pkzipc
14...Email Configuration and Recent History Backup Each Day
....004 Schedule New Task Eliminate Archiving Record
15...Restore Interim Backup Files Pkzipc Extract
16...M250.bat Modify to Apply Pkzipc for Assembling Customer SDS Program
17...Windows XP Date Format


..............
Click here to comment!

CONTACTS 
0201 - Pkware, Inc.                                                                                                                                                       O-00000817 0706
020101 - Mr. Mark Gresbache                                                                                                                                               O-00000817 0706
020103 - Support Department

SUBJECTS
M250.bat Assemble SDS Development Code into Program that Runs on C D

0803 -
0803 -    ..
0804 - Summary/Objective
0805 -
080501 - Follow up ref SDS 12 0000. ref SDS 9 0000.
080502 -
080503 - Change commands from legacy pkzip to use pkzipc.  Hopefully, adding
080504 - commands for attribute and time will resolve recent problems
080505 - transferring and backing up files.
080506 -
080507 -
080509 -  ..
0806 -
0807 -
0808 - Problem
0809 -
080901 - Zip File Operation Seems to Be Changing Date of Files
080902 - Pkzipc Switched Commands Apply Attribute Times Command Consistently
080903 - Backup Interim Transfers Between Computers Pkzip Configure Failing
080904 -
080905 - Follow up ref SDS 12 M65O, ref SDS 9 M65O.
080906 -
080907 - We have had problems the past few days transferring files between
080908 - computers with t11.bat and rcv.bat.  There have also been problems
080909 - with automatic backups, but they are more subtle, and so had not yet
080910 - sparked investigation, though curiosity was being aroused.
080912 -  ..
080913 - Decided today on converting commands to use the program pkzipc.exe,
080914 - received on 020903. ref SDS 3 FG4O  Command revisions for pkzipc were
080915 - discussed on 030203. ref SDS 12 N56F
080917 -  ..
080918 - Full conversion has been resisted to avoid time and frustration
080919 - learning a new command structure, and then changing a lot of code,
080920 - including figuring out where code has to be changed, and experimenting
080921 - to verify correct application, i.e., understand cause and effect,
080922 - within the meaning of "cognitive overhead," presented in NWO.
080923 - ref OF 15 LH6K
080925 -  ..
080926 - Now, however, time lost from extended transfers, and attempting to
080927 - configure pkzipc have risen to the level of encouraging investing time
080928 - to make improvements.
080930 -  ..
080931 - Pkzipc.exe commands do not have single character abbreviations
080932 - available in pkzip.exe.  The new command strings are therefore much
080933 - longer and so harder to remember and use.  Long command strings cause
080934 - mistakes and endless rework.  Correcting one mistake likely results in
080935 - another mistake leading to endless cycles of correcting corrections,
080936 - described in NWO. ref OF 14 7495
080938 -  ..
080939 - Long strings do not work well in DOS batch files.  Implementing the
080940 - Windows XP Start command using cmd executables makes long command
080941 - strings in batch files more easily accommodated for SDS, beginning on
080942 - 030902. ref SDS 16 YO6J and citing research on 030109. ref SDS 11 0Q7O
080943 - Batch file ops to call Windows Start command are described in detail
080944 - on 030902. ref SDS 16 B44K
080946 -  ..
080947 - The main problem seems to be the pkzip "times" command, because pkzipc
080948 - does not seem to be holding configuration...
080949 -
080950 -                      -times=all
080951 -
080952 - ...also discussed on 030203. ref SDS 12 9G8J
080954 -  ..
080955 - When this command is not set, pkzip assigns the date of extraction to
080956 - the files being extracted.  Therefore, eventually every file winds up
080957 - with the same date, and is continually transferred and backed up.  It
080958 - is a mess.  Just contemplating this problem causes a headache.
080960 -  ..
080961 - Design objectives are backing up only new and changed "work" files,
080962 - since everything else can be restored from permanent storage,
080963 - explained on 021012. ref SDS 5 5A41
080964 -
080965 -    The code in 03101 and backup.bat is designed to enter and preserve
080966 -    the date of the last interim backup, and backup everything from the
080967 -    prior date. ref SDS 5 1S9H
080969 -     ..
080970 -    Therefore, if a backup occurred yesterday, or several days earlier,
080971 -    the current interim backup should get everything from the prior
080972 -    date.  Normally, this is only a few MB.  Even if 5 MB is backed up
080973 -    for 60 days, this is only 300 MB, not 1 GB.
080975 -  ..
080976 - Clues about a problem began when a 50 file 40 MB set of pictures from
080977 - Mil's recent birthday party on 060121 kept scrolling across the screen
080978 - during transfers between computers.  The system is designed to avoid
080979 - multiple iterations.  Normally, things scroll so quickly across the
080980 - screen, that such errors are not noticed, but the size of the transfer
080981 - with everything in a constant format permitted notice of repetitive
080982 - error.
080984 -  ..
080985 - Processing the same data over and over, significantly extended the
080986 - time of transfers and daily backups.
080988 -  ..
080989 - Switching to pkzipc permits using -times=all with every extraction,
080990 - and so hopefully will solve the problem.  We can also enter an
080991 - attribute command to include "archive" and "hidden" that affirmatively
080992 - solves the problem of not transferring changed files.
080994 -  ..
080995 - Another big clue that pkzipc was not working correctly was that
080996 - maintenance on SDS macro files in...
080997 -
080998 -                       c: sd 03 0
080999 -
081000 - ...kept showing files that had not been modified suddenly had the
081001 - current date, and so were being continually reprocessed.  This
081002 - eperience had the suspicion of a virus continually changing program
081003 - files.  Investigation found no virus, but the problem continued.  It
081004 - was caused by failure of -times=all in transfers that continually
081005 - assigned the transfer date, so the dates and times were always out os
081006 - sync, and this grew more pronounced as more macros were modified over
081007 - several weeks.
081009 -  ..
081010 - Another problem occurred when SDS records were not being transferred.
081011 - Investigation showed that pkzip was not hold the configuration to
081012 - transfer files with an archive bit.  Investigation wound up showing
081013 - that we have been constructing bigger and bigger interim backups,
081014 - because with -times-all command failing, pkzip was assigning the
081015 - current date to every file transferred.  Interim backups for just 60
081016 - days are now about 1 GB, when they should be perhaps 50 MB.
081018 -  ..
081019 - SDS operations to modify....
081020 -
081021 -    Transfer files................... 01 02 t11.bat, ref SDS 0 U13O
081022 -    Transfer files to Gary........... 01 02 tgj.bat, ref SDS 0 XR8J
081023 -    Interim backup................... backup.cmd, ref SDS 0 NH3N
081024 -    SDS version runs on c drive...... m250.bat, ref SDS 0 Y93L
081025 -
081026 -
081028 -  ..
081029 - Date Command Pkzipc Applies Date Format from Windows XP
081030 -
081031 - Turned out that switching from pkzip.exe to pkzipc.exe caused a
081032 - problem of date formats.  Pkzip.exe uses a consistent date format of
081033 - mmddyyyy.  This was a feature we needed to handle a 4 place year
081034 - representation.  However, pkzipc.exe uses the date format assigned to
081035 - the computer by the operating system.  So, to apply the date
081036 - consistently we need to have a common format for all computers.  Below,
081037 - research found how to set the date format in Windows XP. ref SDS 0
081038 - XA3G
081039 -
081040 -
081041 -
081042 -
0811 -

SUBJECTS
T11.cmd Transfer Files Between Computers to Replicate Work Setting

1003 -
100401 -  ..
100402 - Backup Files Pkzipc.exe Transfer Between Computers Replicate Content
100403 - T11.cmd Transfer Files Between Computers to Replicate Work Setting
100404 - Replicate Work Setting T11.bat Transfer Files Between Computers
100405 - Transfer Files Between Computers to Replicate Work Setting T11.bat
100406 -
100407 - Follow up ref SDS 14 0001.
100408 -
100409 - Per above, ref SDS 0 4E5K, changed commands from pkzip.exe, which we
100410 - have used as z.exe and zu.exe.
100412 -  ..
100413 - Changed file name to t11.cmd, per above. ref SDS 0 Q164
100415 -  ..
100416 - Line 40, ref OF 2 OK5K, in t11.cmd
100417 -
100418 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\01\02\*.* > nul
100419 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\01\04\*.* > nul
100420 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\sd\01\*.* > nul
100421 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\sd\03\*.* > nul
100422 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\sd\10\*.* > nul
100423 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\sd\wl\*.* > nul
100424 -    pkzipc -dir=root -add -attr=readonly,archive -after=%1 cs c:\sd\wt\*.* > nul
100425 -
100426 -        pkzipc replaces z.exe
100427 -
100428 -        -dir=root replaces -P -r commands by capturing subdirectories
100429 -        from the root directory.
100430 -
100431 -        -add replaces -a command.
100432 -
100433 -        -attr=readonly,archive is an added command that replaces
100434 -        trying to configure pkzipc.
100435 -
100436 -        -after=%1 replaces -t...... command.
100437 -
100438 -
100439 -
1005 -

SUBJECTS
Rcv.cmd Pkzipc Extract Files for Transfer Backed Up with Pkzipc.exe

1203 -
120401 -  ..
120402 - Rcv.cmd Pkzipc Extract Files for Transfer Backed Up with Pkzipc.exe
120403 -
120404 - We can replace zu.exe with pkzipc -extr and add -times=all as a
120405 - permanent configuration, rather than depend on pkzipc holding a one
120406 - time configuration.
120407 -
120408 - The change from pkzip to the primary program pkzipc.exe, now requires
120409 - code to configure....
120410 -
120411 -                pkzipc.exe -extract
120412 -
120413 - ...in combination to restore files from a zip file created with
120414 - pkzipc, per above. ref SDS 0 U13O
120416 -  ..
120417 - Pkware who manufactures pkzip does not have online help.
120419 -  ..
120420 - There is no evident set of commands for restoring files to the same
120421 - directory structure, required for transferring between computers.
120422 - The Pkware basic command....
120423 -
120424 -                pkzipc.exe -extract
120425 -
120426 - ...restores files to the current directory, which is a huge mess,
120427 - because files with the same name in different directories conflict
120428 - when restored to a single directory.
120430 -  ..
120431 - Eventually created...
120432 -
120433 -                     c: 01 02 rcv.cmd
120434 -
120435 - ...with following commands....
120436 -
120437 -        c:\sd\01\pkzipc -extr=up -dir=root -times=all cs c:\ *.*
120438 -        c:\sd\01\pkzipc -extr=up -dir=root -times=all ds d:\ *.*
120439 -        c:\sd\01\pkzipc -extr=up -dir=root -times=all fd f:\ *.*
120440 -        c:\sd\01\pkzipc -extr=up -dir=root -times=all gd g:\ *.*
120441 -        c:\sd\01\pkzipc -extr=up -dir=root -times=all hs h:\ *.*
120443 -  ..
120444 - Not sure how this was determined, because there does not seem to be a
120445 - manual, and the online help does have any support for the above
120446 - commands.
120448 -  ..
120449 - Experience shows these commands are effective for transferring files
120450 - between computers.
120451 -
120452 -
120453 -
120454 -
120455 -
120456 -
1205 -

SUBJECTS
Tgj.bat Transfer Files Between Computers to Update SDS and Rod's Rec

1303 -
130401 -  ..
130402 - Tgj.bat Transfer Files to Gary
130403 -
130404 - Follow up ref SDS 4 5Y5H.
130405 -
130406 - Updated this for transferring files to Gary, with exceptions to avoid
130407 - sending confidential files. ref OF 4 R16I
130408 -
130409 -
130410 -
130411 -
130412 -
1305 -

SUBJECTS
Backup Interim Pkzipc Backup.bat Modify Apply for Daily Backup with
M250.bat Assemble SDS Development Code into Program that Runs on C D

1604 -
160501 -  ..
160502 - Modify Interim Backup Code to Apply Pkzipc Backup.cmd and 03101
160503 - Backup.cmd Modify Apply Pkzipc for Daily Backup with SDS Launch
160504 -
160505 - Follow up ref SDS 15 KL8H, ref SDS 9 0001.
160506 -
160507 - Interim backups are accomplished by...
160508 -
160509 -                c: sd 01 backup.bat
160511 -  ..
160512 - Today, decided to switch this to cmd, and make backup.bat call
160513 - backup.cmd, per above. ref SDS 0 Q16K
160514 -
160515 -     [On 070314 developed complementary function for full file monthly
160516 -     backups using conventional DOS file management commands with a
160517 -     related batch command file bk.cmd, that copies files to a new
160518 -     Hitachi 500 GB hard drive. ref SDS 18 V34F
160520 -  ..
160521 - Switched pkzip commands to pkzipc.exe.
160523 -  ..
160524 - Line 110, ref OF 10 5J6J, in backup.bat
160525 -
160526 -    pkzipc -dir=root -add=archive -attr=hidden,archive,readonly -after=20060304 C002341 c:\01\*.* > nul
160527 -    pkzipc -dir=root -add=archive -attr=hidden,archive,readonly -after=20060304 C002341 c:\sd\01\*.* > nul
160528 -    pkzipc -dir=root -add=archive -attr=hidden,archive,readonly -after=20060304 C002341 c:\sd\03\*.* > nul
160529 -    pkzipc -dir=root -add=archive -attr=hidden,archive,readonly -after=20060304 C002341 c:\sd\10\*.* > nul
160530 -
160531 -        pkzipc replaces z.exe
160532 -
160533 -        -dir=root replaces -P captures path subdirectories from root
160534 -
160535 -        -add=attribute replaces -a+ to add files and remove archive attribute
160537 -         ..
160538 -        attr=hidden,archive,readonly replaces trying to configure
160539 -        pkzipc which previously worked pretty well; adding this command
160540 -        will hopefully allow attribute to work everytime.
160541 -
160542 -        -after=yyyymmdd replaces -t..... command.
160543 -
160544 -
160546 -  ..
160547 - Line 120, ref OF 10 FN4N, in backup.bat
160548 -
160549 -    pkzipc -view=brief C002341 > C002341
160550 -
160551 -        pkzipc replaces z.exe
160552 -
160553 -        -view=brief replaces -vb seems to do the same thing and for
160554 -        some reason do not support abbreviations.
160555 -
160557 -  ..
160558 - Was able to apply the same command string for all backup commands.
160559 -
160561 -  ..
160562 - Line 230 ref OF 10 PK9N in backup.cmd
160563 -
160564 -    Customize interim backup for Rod's email
160565 -
160566 -    Create a "config" directory for backing up files to quickly restore
160567 -    email program configuration if it gets messed up some way or
160568 -    another.
160569 -
160570 -
160571 -
160572 -
160574 -     ..
160575 -    03101 Modify to Post New Structure Using Pkzipc
160576 -
160577 -
160578 - Line 190, ref OF 6 9W6H, -label lp1a in 03101
160579 -
160580 -    of 67
160581 -    -label lp1a
160582 -    z 61 66
160583 -    l /-after/
160584 -    -if @0 > 0 -goto nxT
160585 -    loc_cur 3 1
160586 -    macro 1181
160587 -    rel_cur 0 2
160588 -    -gosub time
160589 -    -goto lp1a
160590 -
160591 -        Changed this to apply new positions for entering date of backup
160592 -        changing from pkzip that uses single char commands to pkzipc
160593 -        that requires full command names.
160595 -         ..
160596 -        of 67 offsets to date field param of pkzipc "-after" command; z
160597 -        61 66 zones on "after" command to find all instances for
160598 -        updating the date of the backup captured from the prior backup.
160599 -
160600 -
160601 -
160603 -  ..
160604 - Email Configuration and Recent History Backup Each Day
160605 -
160606 - Line 320, ref OF 6 HT3K, -label end in 03101 about 60 lines below
160607 -
160608 -    This code saves the current configuration for email in the
160609 -    directory...
160610 -
160611 -       Rod
160613 -          ..
160614 -         copy h:\00\07\00101 h:\00\07\00101\config\ddhhmmss
160616 -        ..
160617 -       Millie
160618 -
160619 -         copy h:\00\07\00102 h:\00\07\00102\config\ddhhmmss
160621 -     ..
160622 -    Uses copy command because could not figure out how to get xcopy to
160623 -    work copying over a lower level subdirectory.
160625 -     ..
160626 -    The code further saves...
160627 -
160628 -       Rod
160629 -
160630 -         copy h:\00\07\00101\mail h:\00\07\00101\config\ddhhmmss\mail
160631 -
160632 -       Millie
160634 -          ..
160635 -         copy h:\00\07\00102\mail h:\00\07\00102\config\ddhhmmss\mail
160636 -
160637 -
160638 -
160639 -
160640 -
160641 -
160643 -     ..
160644 -    004 Schedule New Task Eliminate Archiving Record
160645 -
160646 -
160647 - Line 370, ref OF 5 0902, -label efnnsr in 004 about 130 lines below
160648 -
160649 -    e c:\sd\03\004
160650 -    datecnt 1 0
160651 -    line                                   && *%4y
160652 -    loc_cur 4 15
160653 -    -if @3 < 10 ic 48
160654 -    inscnt 3 0
160655 -    -if @4 < 10 ic 48
160656 -    inscnt 4 0
160657 -    -if @5 < 10 ic 48
160658 -    inscnt 5 0
160659 -    -if @6 < 10 ic 48
160660 -    inscnt 6 0
160661 -    ecur 68
160662 -    *%4y
160663 -    savx e:\sd\12\hms
160664 -
160665 -        Decided to unplug this created on
160666 -
160667 -
160668 -
160669 -
1607 -

SUBJECTS
Restore Files Procedures Pkzipc.exe -Extract from Interim Backup Fil

1803 -
180401 -  ..
180402 - Restore Interim Backup Files Pkzipc Extract
180403 -
180404 - Typically, only one or a few files and only on rare occassions need to
180405 - be restored from daily interim backups created with the system
180406 - developed per above. ref SDS 0 EL5K
180407 -
180408 - Commands to restore a specific file or from a particular directory
180409 - are not clear from guidance provided by Pkware.
180411 -  ..
180412 - This problem can be solved using commands for restoring files to
180413 - transfer files, per above. ref SDS 0 QQ6K
180415 -  ..
180416 - Commands can be assembled in a temporary batch file, and then run with
180417 - following typical example...
180418 -
180419 -        pkzipc -extr=up -dir=root -times=all e:\sd\backup\20060217\h010929 \09\ *.*
180421 -  ..
180422 - This...
180423 -
180424 -            e:\sd\backup\20060217\h010929                                *.*
180425 -
180426 - ...is the location of the zip file, created per above. ref SDS 0 EL5K
180427 -
180429 -  ..
180430 - This unzips all the files in the interim backup to c:\09 for temporary
180431 - use, and then the one or few needed can be copied to the correct
180432 - location.
180434 -  ..
180435 - After the restore has been accomplished the temporary files restored
180436 - to \09 can be deleted.
180437 -
180438 -
180439 -
180440 -
180441 -
180442 -
180443 -
1805 -

SUBJECTS
SDS Version for Customers Runs on C Drive Created by Macro 0815 and

2203 -
220401 -  ..
220402 - M250.bat Modify to Apply Pkzipc for Assembling Customer SDS Program
220403 -
220404 - Follow up ref SDS 17 5M7W.
220405 -
220406 - This routine assembles files for the SDS program after conversion to
220407 - run on the c: drive, and is located at...
220408 -
220409 -                c: sd 01 m250.bat
220411 -  ..
220412 - Line 210, ref OF 11 N96N in m250.bat
220414 -  ..
220415 - This assembles the "single" user version of SDS.  At the present time,
220416 - we are using this version, this is easy to convert for a time when it
220417 - may be useful.
220419 -  ..
220420 - Change....
220421 -
220422 -       c:\sd\01\z -P -r -a g:\sd\50\03 *.*
220423 -
220424 - ...to...
220425 -
220426 -       c:\sd\01\pkzipc -dir=root -add -attr=readonly,archive g:\sd\50\03 *.*
220427 -
220428 -
220430 -  ..
220431 - Line 250, ref OF 11 RE6H in m250.bat
220433 -  ..
220434 - This assembles the "corporate" user version of SDS.  At the present
220435 - time, we are using this version, this is easy to convert for a time
220436 - when it may be useful.
220438 -  ..
220439 - Change...
220440 -
220441 -      c:\sd\01\z -P -r -a g:\sd\50\02 *.*
220442 -
220443 - ...to
220444 -
220445 -      c:\sd\01\pkzipc -dir=root -add -attr=readonly,archive g:\sd\50\02 *.*
220446 -
220447 -
220449 -  ..
220450 - Line 300, ref OF 11 M84J in m250.bat
220452 -  ..
220453 - This assembles the executive or "full" version of SDS, which is
220454 - currently all that is being developed.
220456 -  ..
220457 - Change...
220458 -
220459 -      c:\sd\01\z -P -r -a g:\sd\50\01 *.*
220460 -
220461 - ...to...
220462 -
220463 -      c:\sd\01\pkzipc -dir=root -add -attr=readonly,archive g:\sd\50\01 *.*
220464 -
220465 -
220466 -
220467 -
220468 -
220469 -
2205 -

SUBJECTS
Date Format Displayed for File Listings

2303 -
230401 -  ..
230402 - Windows XP Date Format
230403 -
230404 - We have another problem of the date format.  pkzipc uses the format
230405 - set for the operating system.  On c14 this is yyyymmdd, on c15 it is
230406 - mmddyyyyy
230408 -  ..
230409 - How to change date format?  In Windows XP....
230410 -
230411 -    Control Panel
230412 -        Regional and Language Options
230413 -            Customize
230414 -
230415 -               This is a little hard to see, but is about 3 lines down
230416 -               on the right side.
230418 -                ..
230419 -               In Customize there is a tab for "Date" and the format
230420 -               can be set...
230421 -
230422 -                          yyyy-mm-dd
230423 -
230424 -
230425 -
230426 -
230427 -
230428 -
230429 -
230430 -
230431 -
230432 -
230433 -
2305 -
Distribution. . . . See "CONTACTS"