|
Answer» I have a file called mtcdata.csv located on \\server01\arthur\mtcdata.csv
I need to copy this file to \\serverweb\file\data\mtcdata.csv
then I want to set a scheduled task to copy the file every NIGHT at midnight to the new location.
I am guessing I need to map drives copy the file then remove the drive mapping??
Help please.
Thanks, TinaYes... Drives will have to be mapped & permissions set to allow for writing to the destination which is more secure than creating a batch that CREATES the maps and DISPLAYS the credentials in a NET USE fashion.
If you create the maps in Windows or Windows Server environment and write a batch that will perform the copy from say Drive Map Y: to Z: and then add this batch into a windows scheduled task, you should then be all set.
Other issues you can run into without use of maps is UNC CALL issues.
IF the server01 was Y: and serverweb was Z: with map directly to roots of the pickup and drop location ( FULL path ) a batch like below would work best.
Code: [Select]XCOPY Y:\mtcdata.csv Z:\*.* /s/d/y Whereas the mtscdata.csv file would be overwritten if the next execution of this batch held a newer date/time stamped mtcdata.csv file. If the date/time stamp hasnt changed then it will ignore a copy, and if the file does not exist at the destination it will also write the file to Z:\ if the file does not exist at Z:\.
If say you wanted all files and folders at Y:\ copied to Z:\ and updated by scheduled task you can simply change Y:\mtcdata.csv to Y:\*.* for wildcard to grab and backup all to Z:\
|