The boss requires regularly backing up the design schemes of all computers in the design department to the server. I found this command available in a post:
for /r c:\ %a in (*.cdr) do @copy "%a" d:\
My approach is to first map the disk of each computer on the server, and then use the above command to search for cdr files and copy them to the server. But when I tested, I found that this statement can run in cmd, but when made into a batch file and run, it just flashes by and has no effect. Please help, thanks in advance.
In addition, when this command runs, can it add a function to automatically overwrite when encountering files with the same name? Because it needs to be backed up automatically every day, there will definitely be duplicates to overwrite. Thanks a lot for everyone's help.
for /r c:\ %a in (*.cdr) do @copy "%a" d:\
My approach is to first map the disk of each computer on the server, and then use the above command to search for cdr files and copy them to the server. But when I tested, I found that this statement can run in cmd, but when made into a batch file and run, it just flashes by and has no effect. Please help, thanks in advance.
In addition, when this command runs, can it add a function to automatically overwrite when encountering files with the same name? Because it needs to be backed up automatically every day, there will definitely be duplicates to overwrite. Thanks a lot for everyone's help.
