| 1. |
Solve : Help needed using wildcards with the copy command.? |
|
Answer» I'm trying to copy two files from two seperate UNC's to a single directory on a single server, appending the source server name to each file to AVOID duplicate file names at the destination. I'm trying to copy two files from two seperate UNC's to a single directory on a single server, appending the source server name to each file to avoid duplicate file names at the destination.Are there just 2 files, or 2 SETS of files? And what OS are you RUNNING? If 2 files, you can do something like: ::copylogs.cmd Code: [Select]copy "\\server1\c$\data\server.log" "\\DestServer\c$\logs\server1_server.log" copy "\\server2\c$\data\server.log" "\\DestServer\c$\logs\server2_server.log" If it is 2 sets of files, then depending on your OS, you can probably accomplish your TASK with a FOR /F loop for each set. |
|