Automatic Copy Process

By syedalimurtuza ·
Hi there,

Is there a way to automate a copy process. The origianl file resides on server X and I would like to copy it on Server Y. Is there a way to schedule a time to copy the same file at a given time?

Thank you.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -


by Dr Dij In reply to Automatic Copy Process

depending on the operating system, most OS'es have scripting and scheduling of scripts

Collapse -


by t_w_dragon In reply to Automatic Copy Process

As I do it, I wrote a batch file to run all the commands and just schedule the task to call up the batch file at a given time. The rest is done by the batch file.

Collapse -


by syedalimurtuza In reply to Yes...

Thanks for the reply. I'm an entry level IT tech. If you could elaborate or show me the batch file and show me how to set up schedule on Widows server 2003. I'll really appreciate your help.


Collapse -

copy batch

by Churdoo In reply to Thanks.

If you're talking about a Windows system, create a file named something like mycopy.bat. Edit the file and in it put some semblance of the following command

copy \\serverx\sourceshare\sourcefolder\sourcefile \\servery\destshare\destfolder /y

sourceshare = the name of the share on ServerX that the file resides in
sourcefolder = the folder or folders, relative to the share that the source file resides in
sourcefile = the name of the file that you want to copy
destshare, destfolder = the name of the share and folder on ServerY that you want to copy the file to

Note: the /y at the end of the command causes the command to overwrite the file at the destination if it already exists.

I'm assuming that the user account that will be running this command has permissions to read from the source share and write to the destination share. You can put multiple copy commands, one on each line if you want to copy multiple files, or use wildcards as applicable. Also if there are spaces in either the source path or destination path, you'll have to use quotes around any path component that has spaces, or look up the 8.3 names within the path.

Once you have created the .bat file and have tested it by running from a command prompt, use Scheduled Tasks (Start/Programs/Accessories/System Tools/Scheduled Tasks) to run the above .bat file at scheduled times/intervals

This should get you started, and look up the link that one of the other posters provided for more info on the copy command or other commands.

Collapse -

Re: Copy Batch

by syedalimurtuza In reply to copy batch

Thanks much. It is all clear now.

Collapse -

xxcopy has some

by Dr Dij In reply to Re: Copy Batch

options (tons of them)
you can visit their website

Collapse -

Check this out

by Nimmo In reply to Automatic Copy Process

Here is a good link to show you how to use commands for making batch files.

Related Discussions

Related Forums