Saving files without repeating

B

Beyond X

I know this is a basic thing in saving files, but please help.
I have hundreds document files in a folder and I add some more every now
and then. Just in case the computer crashes irrecoverably, I save the
whole folder in another partition or another disk.
If I use the usual COPY command, it copies one by one taking a long time.
In old times and in somewhere, I recall, there was a way to save files
by picking only newly added files ignorering previously saved files. But
I no longer remember where it was and what software it was.
Can someone tell me where I can find it or how I can do it with existing
Windows functions. Thanks.

* My graphic software transfers only picture files from the memory card
in my digital camera if they were not already transfered previously. But
this function is a part of the graphic software and thus I cannot use
the function for general use. I am looking for a small utility software
which does a similar job for a folder or its contents.
 
J

Jay Freedman

Here's how to do what you want with a command line or a batch file.

Every file has a set of "attributes" or flags. The one that indicates
a new file is the Archive attribute. (If you like, you can choose to
have the Windows Explorer / My Computer window show file attributes,
in which case you see an A in that column for files that haven't been
backed up yet.)

If your backup is currently up to date, first prepare the folder by
turning off the Archive attribute of all the files in it with these
commands:

CD <path of folder>
ATTRIB -A *.*

(If the backup is not up to date, skip that step; the first run of the
next step will copy all the files and also turn off all the Archive
attributes, so all other runs will only copy new files.)

Now enter (or put into a batch file) these commands:

CD <path of folder>
XCOPY *.* <path of backup> /M/Y

The XCOPY command has many more capabilities than the plain old COPY
command. The /M switch tells it to copy only files that have the
Archive attribute turned on, and at the same time turn it off. The /Y
switch tells it not to ask you before overwriting files that already
exist at the destination.

After all that, I'll suggest that there is a simple way to do this in
the Windows Explorer / My Computer window: As mentioned before, you
can go to the View menu, click Choose Columns, and select the
Attributes column to display in Details view. Then click the header of
the Attributes column in the Details list, which will sort the files
so all the ones with an A in that column are together. You can click
the first one, Shift+click the last one, and copy / paste them to the
backup destination.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
B

Beyond X

Stephan and Jay,
Thank you very much for your prompt responses.
The idea offered is a bit above my head and I will probably need some
time for digesting and experimenting. I will come back later and report
the results. Thanks so much again.
 
S

Stefan Blom

Start a command prompt window, for example via Start | Run: type cmd and
press Enter. You can use xcopy /? to get help with the syntax.

Do post back if you need additional assistance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top