Task Scheduler - Move File
Thanks, I got it figured out. I did it the same way you explained and it worked.
August 22nd, 2012 2:41pm

We use 3rd party software to create a couple of daily backups. I would like to create an automated task that takes those backup files and copies or moves it to a flash drive that is plugged into the server. What are the commands I need to use to accomplish this? This is for Server 2008. Thanks.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 12:57pm

Do you have a few more details on the files, are they always the same name? Do you overwrite them everyday with the newest ones or do they need to be renamed before you move or copy them so they don't overywrite the files currently on the disk etc? If the flash drive is always plugged into the server with the same drive letter? Are the backups created on the server with flash drive or are the files from other servers and are dumped on this server using the 3rd part software? You can do this several ways depending on how your backups are created and from where. Will the 3rd part software allow you to use the flash drive to dump the backup files to? If not and you have to copy or move them to the flash drive you can use the following commands in a batch file (.bat) and use the task scheduler to run the batch file at a given time every day. copy source drive:\source folder\file name.??? drive:\destination folder\file name.??? or move source drive:\source folder\file name.??? destination drive:\destination folder\file name.??? example: copy d:\backupfolder\backupfile.bkf x:\backupfolder\backupfile.bkf move d:\backupfolder\backupfile.bkf x:\backupfolder\backupfile.bkf example (surpress prompting to confirm overwrite): copy /Y d:\backupfolder\backupfile.bkf x:\backupfolder\backupfile.bkf move /Y d:\backupfolder\backupfile.bkf x:\backupfolder\backupfile.bkf you need to create the destination folder before attempting copy or move them or the command will fail because the folder does not exist, and if you are going to be overwriting files with same name you will want to surpress prompting with /Y flag in the commands, same flag works with copy or move. I would also suggest a couple things, I would create a jobs folder on the server to put your .bat file in and then use task scheduler on the server to run the batch file, I would also suggest copying the files if you have enough space on the server to leave the backup files only in case there is a failure of the flash drive you have the originals on the server still and or if any of the backup files become corrupt on either of the storage media, it allows you to hopefully recover from one or the other.
August 24th, 2012 4:00pm

Thanks, I got it figured out. I did it the same way you explained and it worked.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 4:22pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics