Create a batch file to copy and paste specific files.

0 Comments »
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:
http://uploading.com/files/H2N91DDO/batch.txt.html

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:




source: google answers
12:09 PM

0 Responses to "Create a batch file to copy and paste specific files."

Post a Comment