簡體   English   中英

創建批處理文件以復制以“ABC”開頭並以“當前”結束的文件到另一個文件夾

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

我有一個要求,我必須創建一個批處理文件來復制以'ABC'開頭並以Current.xls結尾的文件夾中的文件。

對於前:

文件在文件夾中

C:\\Sample\Source

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

我想復制以ABC開頭並以Current結尾的文件到新文件夾。

我嘗試使用xcopy命令,但我不知道如何搜索文件名。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM