How to copy a file ?
Hi, I have windows 7 machine and want to write a batch file to copy one single file from source to destination folder but with a different name. Source and destination are different computers on the network. Can somebody give me the script to do that ? Also, what should be used : Robocopy or XCOPY ?Kulvinder Singh
October 5th, 2012 8:46pm

Hi. If you have access to both servers, you can use this direct command: echo f | xcopy \\server1\share\file1.dat \\server2\share\file2.dat Xcopy asks, if file2.dat is file or directory. That's why there is "echo f" :) M.
Free Windows Admin Tool Kit Click here and download it now
October 5th, 2012 11:25pm

When i do the copy, the file created has the same creation date as the source file. How do i get a new creation date ?Kulvinder Singh
October 11th, 2012 7:19am

When i do the copy, the file created has the same creation date as the source file. How do i get a new creation date ? Kulvinder Singh This is the way the "copy" commands are designed to work: They create an exact copy of the source file. If you wish to change the file's date stamp then you can use one of the many "touch" tools, e.g. this one: http://pobox.com/~stevemil
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2012 9:23am

When i do the copy, the file created has the same creation date as the source file. How do i get a new creation date ? Kulvinder Singh This is the way the "copy" commands are designed to work: They create an exact copy of the source file. If you wish to change the file's date stamp then you can use one of the many "touch" tools, e.g. this one: http://pobox.com/~stevemil
October 11th, 2012 9:23am

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

Other recent topics Other recent topics