Good Day 16582jade,
A batch file will do the job just fine. Please, before you try any of
the following, backup all your data onto a CD and put it aside... just
in case something goes wrong.
For this example I am going to assume that your CD-RW is in drive G:
and that all your files are on Drive F: in the root directory.
Sample code:
XCOPY F:\*.* G:\ /C /S /D /Y /I
Let's break things down:
XCOPY allows for copying of files, directories, and sub directories.
F:\*.* is our source location
G:\ is our destination location
/C tells XCOPY to ignore errors, and finish what can be done
/S tells XCOPY to copy everything including directories and
subdirectories
/D tells XCOPY to only copy source files that are newer than the
destination files (big time saver on the process)
/Y tells XCOPY to overwrite files without asking for confirmation
/I tells XCOPY to automatically create new directories on the
destination, if new directories were created in source.
Now, let us say that the files you want copied are on drive F, in the
directory/folder called "GOOGLE", and your CD writer is still G:
XCOPY F:\GOOGLE\*.* G:\GOOGLE\ /C /S /D /Y /I
In this example, you would have to manually create the GOOGLE
directory on drive G: . Of course, you only would need to do this
once. All subdirectories in GOOGLE would get transferred
automatically. Why does GOOGLE have to be created on the CD? Well, our
source specification already entered the directory GOOGLE (XCOPY
F:\GOOGLE\...) The /I switch only works on directories after the
current path. The current path has to exist, and the /I switch will
create the subdirectories that follow.
With the code copied, paste it into notepad, and update the locations
to reflect your actual drives and folders. Save the file as
filename.bat and for ease of use create a shortcut to the file from
the desktop.
You can further customize these batch files to include specific files,
but things will get messy. I would recommend having the files you need
backed up all in one directory, and just copying over the whole
directory each time. This will ensure that any new files created get
copied automatically, without the need to ever change the batch file.
As long as any new files are put into the directory specified in the
batch file (or a subdirectory of it), they will get copied.
There is no limit on how many lines you can have in a batch file, so
you can repeat this code as often as you wish with different sources
and destinations. However, if everything is in subdirectories of the
source destination, all you need is the one line. Multiple lines are
required for directories not on the same branch, or if you only wish
to copy select subdirectories of the source.
I hope this helps more then confuses. I have also found an article
that goes through very similar steps:
WEBSITE: Backup Important Files With This Simple Batch File.
URL: http://techrepublic.com.com/5100-6270-1051305.html
A suggestion made in the article is to have the batch file executed
via the Task Scheduler. An option you might find useful if anyone
tends to forget to go through the backup process.
Please do not hesitate to ask for a clarification if you require
further assistance. I will be happy to help you in any way I can. If
you are not sure how to modify the code, please send me a full list of
files/locations you need backed up, and I will write the code for you.
Thank you for choosing Google Answers.
SEARCH STRATEGY:
Google Search for "batch file"+"learn"+"simple"
Regards,
slawek-ga |