R
Robin Clay
Greetings !
If, while using Windows Explorer,
I drag a folder from one disk to another,
the files in the dragged folder
and its sub-folders are written
to the target disk - regardless.
This means that
(a) newer files may be over-written by older files, and
(b) EVERY file is copied - which can take HOURS.
Challenge 1
I want to do selective backups,
copying from the "main" disk to
a backup disk ONLY those files
more recent than a defined date
(that of the last backup).
Challenge 2
I want to do a different form of
selective backup, copying from
the "main" disk to a backup disk
ONLY those files that either do
not exist on the backup disk,
or are more recent than the version
stored on the backup disk.
My current attempts are based
upon shelling out to DOS to run
dir /s >>Source.lst
dir /s >>Target.lst
to generate text files for the two disks.
The Target list is then read in
line-by-line and stored in a worksheet
with one file record on each line,
bearing in adjacent columns
the Drive letter, the path, the filename,
the date and the size.
I then read in the other file line-by-line
and compare this entry with the
tabulated entries. When a match is found,
action is directed into a batch file
that is run upon completion.
"There must be a better way" !
Any ideas would be most welcome !
RClay AT haswell DOT com
If, while using Windows Explorer,
I drag a folder from one disk to another,
the files in the dragged folder
and its sub-folders are written
to the target disk - regardless.
This means that
(a) newer files may be over-written by older files, and
(b) EVERY file is copied - which can take HOURS.
Challenge 1
I want to do selective backups,
copying from the "main" disk to
a backup disk ONLY those files
more recent than a defined date
(that of the last backup).
Challenge 2
I want to do a different form of
selective backup, copying from
the "main" disk to a backup disk
ONLY those files that either do
not exist on the backup disk,
or are more recent than the version
stored on the backup disk.
My current attempts are based
upon shelling out to DOS to run
dir /s >>Source.lst
dir /s >>Target.lst
to generate text files for the two disks.
The Target list is then read in
line-by-line and stored in a worksheet
with one file record on each line,
bearing in adjacent columns
the Drive letter, the path, the filename,
the date and the size.
I then read in the other file line-by-line
and compare this entry with the
tabulated entries. When a match is found,
action is directed into a batch file
that is run upon completion.
"There must be a better way" !
Any ideas would be most welcome !
RClay AT haswell DOT com