简体   繁体   English

创建批处理文件以复制以“ABC”开头并以“当前”结束的文件到另一个文件夹

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

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. 我有一个要求,我必须创建一个批处理文件来复制以'ABC'开头并以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 ends with Current to a new folder.. 我想复制以ABC开头并以Current结尾的文件到新文件夹。

I tried using the xcopy command but I don't know how to search for the filenames. 我尝试使用xcopy命令,但我不知道如何搜索文件名。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 批处理文件以删除另一个文件夹内的文件夹 - a batch file to delete a folder which is inside another folder 批处理文件,仅将每个子文件夹的文件类型之一复制到另一个文件夹 - batch file to copy only one of filetype for each subfolder to another folder 如何在批处理文件中将选定的文件从一个文件夹复制到另一个文件夹? - How to copy selected files from one folder to another in Batch file? 从当前文件夹运行批处理文件 - Batch file runfrom current folder Windows批处理文件脚本将每个第十个文件从一个文件夹复制到另一个文件夹 - windows batch file script to copy every tenth file from a folder to another folder 如何通过在批处理脚本中创建当前日期来复制文件并粘贴到文件夹中 - How to copy files and paste in folder by creating a current date in batch script 有没有一种方法可以将带有批处理文件的文件复制到该批处理文件所在的文件夹中? - Is there a way to copy files with a batch file to the folder that batch file is in? 批处理文件生成另一个批处理文件,该批处理文件生成另一个文件 - batch file makes another batch file which make another file 批处理脚本从文件夹复制最新文件 - Batch Script to copy latest file from Folder 如何获取批处理文件使用其当前文件夹路径来完成 mkdir 并复制项目/目标路径? - How to get a batch file use its current folder path to complete mkdir and copy item/destination paths?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM