How do I schedule an automatic file copy?

G

Guest

Hopefully this is a "basic" question. I would like to know how to create a Scheduled Task that will copy files from my C: drive to my E: drive at a specified time. My E: drive is an external USB Hard Drive. For instance, I would like to copy a folder (like "My Documents") from my C: drive to my E: drive every Friday at 5:00pm. I think I understand the time part of the equation but I'm having trouble figuring out the 'task' part of it. Can anyone give me a step by step process to create such a thing? Or is there a better way to accomplish what I want to do

Thanks
B
 
D

Donald McDaniel

BW said:
Hopefully this is a "basic" question. I would like to know how to
create a Scheduled Task that will copy files from my C: drive to my
E: drive at a specified time. My E: drive is an external USB Hard
Drive. For instance, I would like to copy a folder (like "My
Documents") from my C: drive to my E: drive every Friday at 5:00pm.
I think I understand the time part of the equation but I'm having
trouble figuring out the 'task' part of it. Can anyone give me a step
by step process to create such a thing? Or is there a better way to
accomplish what I want to do?

Thanks,
BW

1) Create a batch file (using Notepad) which contains a command to copy the
file from its home directory to your USB HD. The batch file must have
either a ".bat" or ".cmd" extension. Make sure you remember where you save
this file.

Ex:
"xcopy x:\dirname\subdirname\filename.ext
z:\dirname\subdirname\filename.ext" (where
"x:\dirname\subdirname\filename.ext" is the fully qualified path name of the
file you want to copy each Friday at 5:00pm" and
"z:\dirname\subdirname\filename.ext" is the fully qualified path name of the
copy of the file you want to store on your USB drive.

Also make sure that if the file name or parent directories of the file to be
copied have spaces in them, to enclose the entire paths in double-quotes,
both in the source clause, and the destination clause.

xcopy's general syntax is "xcopy source destination /switches". Don't
forget to make sure that there is at least one space between the source,
destination, and switches clauses.

If you want to know the various switches xcopy can use, open a command
prompt and enter the command "xcopy /?". xcopy is very powerful.

2) Add a Scheduled Task which executes this batch file at 5:00 pm every
Friday.

This Scheduled task will run at 5pm (or as soon after 5pm Windows is able to
execute the task.
**** NOTE ****
If your USB drive is not connected at the time the batch file runs, the
batch file will break with an error. However, the Scheduled task will
attempt to run

I'm pretty sure that xcopy will copy across physical disks. If not, someone
please correct me.

--
Donald L McDaniel
Post all replies to the Newsgroup,
so that all may be informed.
Remove the obvious to reply by email.
+++++++++++++++++++++++++++++++++++++
 
G

Guest

Donald,

Thank you very much for your response. That's exactly what I needed. I really appreciate the step by step instructions rather than a general "just use a scheduled task" type of response.

Thanks again,
BW
 
D

Donald McDaniel

BW said:
Donald,

Thank you very much for your response. That's exactly what I needed.
I really appreciate the step by step instructions rather than a
general "just use a scheduled task" type of response.

Thanks again,
BW

My pleasure..

--
Donald L McDaniel
Post all replies to the Newsgroup,
so that all may be informed.
Remove the obvious to reply by email.
+++++++++++++++++++++++++++++++++++++
 
Joined
Dec 21, 2011
Messages
1
Reaction score
0
And since we are in 2012, is there a software that does all that? Because like BW, I need to copy a file every day but I need to change the name of the new file also. It's a database and I want to keep a copy for every day.
 

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