tags:

views:

168

answers:

1

When I use the following code in command prompt, it works fine. But when I use the same code in a batch file, nothing happens. My batch file simply consists of:

for %f in (D:\flexcube1,D:\flexcube2,D:\flexcube3) do xcopy %f D:\o\ /e  

but it does not work. I don't understand it and I have to use a batch file to copy multiple files. Any help would be really appreciated.

+1  A: 

You need to use two % signs in for commands in a batch script (I know, who would have thought?)

for %%f in (D:\flexcube1,D:\flexcube2,D:\flexcube3) do xcopy %%f D:\o\ /e
Jon
thanks a lot :). its working now
sushant