开发者

Saving multiple files through xcopy in a batch file

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜