开发者

Windows Batch Copy file by filename

开发者 https://www.devze.com 2023-03-25 02:22 出处:网络
The file I want to copy is located in \"C:\\Report\\\" and the filename I want to copy is something like \"rptXXXX.txt\".

The file I want to copy is located in "C:\Report\" and the filename I want to copy is something like "rptXXXX.txt". Wha开发者_如何学Ct I want to do is write a batch that copy the file that the filename is start with "rpt".

The destination folder is "F:\Project\Report\".


This should work, you can use an * as a wildcard:

xcopy e:\foo\rpt*.txt e:\foo2

or in your case,

xcopy C:\Report\rpt*.txt F:\Project\Report\
0

精彩评论

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