I have updated it to: FOR /F %i IN (textfile.txt) DO ROBOCOPY \\server\data2\%i \\server\test
Still no luck... Do I need anything special with my text file? It is just a text file with each file name on its own separate line... Thanks! -----Original Message----- From: Tim Evans [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 3:09 PM To: NT System Admin Issues Subject: RE: robocopy syntax question I think that should be: FOR /F %i IN (textfile.txt) DO ROBOCOPY \\server\data2\%i \\server\test %I is replaced with each line in textfile.txt (i.e. each file name) ...Tim -----Original Message----- From: Bill Krumel [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 1:04 PM To: NT System Admin Issues Subject: RE: robocopy syntax question Malcom, I have the following saved in a batch file along with textfile.txt All I get is a black screen that goes away really quick. I tried putting in a PAUSE and that didn't work either. Any Ideas? What is the %i for? -------------------------------------------------------------------- FOR /F %i IN (textfile.txt) DO ROBOCOPY \\server\data2\ \\server\test %i -----Original Message----- From: Malcolm Reitz [mailto:[EMAIL PROTECTED] Sent: Thursday, January 03, 2008 2:54 PM To: NT System Admin Issues Subject: RE: robocopy syntax question You are going to run out of buffer for the command line waaaay before you get 3000 file names in there anyway. If you can't put all the 3000 files in a single folder structure for copying, I'd do it with a text file (1 file per line) and a FOR statement. FOR /F %i IN (filelist.txt) DO ROBOCOPY source_folder destination_folder %i [options] Malcolm -----Original Message----- From: Bill Krumel [mailto:[EMAIL PROTECTED] Sent: Thursday, 03 January, 2008 14:33 To: NT System Admin Issues Subject: robocopy syntax question The syntax for robocopy is: ROBOCOPY source_folder destination_folder [file(s)_to_copy] [options] Does anyone know what you use for separators between the files you specify? I am pasting in like 3,000 file names and have tried ,'s ""'s and just spaces as separators. Just spaces below works until it goes to the new line. I've also tried turning word wrap on and off. Any Ideas? THANKS! my code --------------------------------------------------------------------- ROBOCOPY \\server1\data2\ \\server2\test 24761.TIF 28175.TIF 25116.TIF 7989.TIF 8024.TIF 33449.doc 33448.doc ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~ ~ Upgrade to Next Generation Antispam/Antivirus with Ninja! ~ ~ <http://www.sunbelt-software.com/SunbeltMessagingNinja.cfm> ~