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:\f开发者_C百科lexcube1,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.
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
精彩评论