开发者

Creating Batch file to copy file which starts with 'ABC' and ends with 'Current' to another folder

开发者 https://www.devze.com 2023-01-09 20:56 出处:网络
I have a requirement in which I have to create a batch file to copy files in a folder that starts with \'ABC\' and ends with Current.xls.

I have a requirement in which I have to create a batch file to copy files in a folder that starts with 'ABC' and ends with Current.xls.

for ex:

the files are in the folder

C:\\Sample\Source

ABC Great outdoors Current.xls
ABC Great outdoors Previous.xls
ABC Treading corp  Current.xls

I want to copy the files which starts with ABC and e开发者_开发知识库nds with Current to a new folder..

I tried using the xcopy command but I don't know how to search for the filenames.


copy C:\Sample\Source\ABC*Current.xls targetfolder
0

精彩评论

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