批处理文件移动文件基于其名称的一部分 [英] Batch File move files base on part of their name

查看:69
本文介绍了批处理文件移动文件基于其名称的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

bat文件是否可以在文件夹中搜索并查看文件名,并且仅移动具有该名称或名称中的一部分的文件?然后将它们移到指定位置. 例如:

Is it possible for a bat file to search through a folder and look at the file names and only move files with that name or part of that name in it? Then move them into a specified location. For example:

Parent Folder 
Arrow0273.text
Arrow0314.text
Spear083112.text
Spear0832.text 
Sheild087.txt
Sheild87.txt 

Move only the files with "Arrow" in their name into folder location "A". 
ect... 

谢谢你们! 找到了这个,但是不确定是否是我要寻找的,老实说,不确定该代码如何工作. 将文件移动到基​​于文件某些部分的目录名字?

Thanks Guys! Found this but not sure if it is what I'm looking for, and to be honest, not sure how that code works. Move files to directories based on some part of file name?

推荐答案

副本支持通配符,因此您所需要做的就是:

copy supports wild cards so all you need to do is:

copy Arrow* A

这篇关于批处理文件移动文件基于其名称的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆