Windows 批处理文件根据 csv 中指定的类型将文件排序到单独的目录中
我不想问这个问题,但我正处于时间紧迫的状态,我希望更熟悉批处理的人可以帮助我比我自己学习所有语法更快。
我的处境很不幸,我的环境只安装了裸机 Windows XP,无法安装任何其他软件。
我需要根据 csv 文件中指定的类型将包含数千个文件的目录分类为几个文件夹:
fileName1,type1
fileName2,type2
fileName3,type4
fileName4,type1
csv 文件不包含文件扩展名,但不存在具有相同名称和不同扩展名的文件。
我需要一个脚本,将每个文件放入一个与指定类型名称相同的目录中,这样当我完成时,每种类型都有一个目录,并且与该类型匹配的所有文件(如 csv 中指定的)都在里面。
任何人都可以提供一些关于如何使用批处理脚本完成此任务的指导吗?
I hate to ask this, but I'm in a time crunch and I'm hoping someone with more familiarity with batch can help me much quicker than I could learn all of the syntax myself.
I'm in an unfortunate situation where I have an environment with a bare Windows XP install that I cannot install any additional software to.
I need to sort a directory of several thousand files into a handful of folders based on a type specified in a csv file:
fileName1,type1
fileName2,type2
fileName3,type4
fileName4,type1
The csv file does not include the file extensions, but there are no files with the same name and different extensions.
I need a script that will put each file into a directory named the same as the specified types so that when I'm finished I have one directory for each type and all the files that match that type (as specified in the csv) are inside.
Can anyone provide some direction on how to accomplish this with a batch script?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@ 抑制移动命令文本的回显,尽管移动命令仍然列出它移动的文件。
The @ suppresses the echoing of the text of the move command, although the move command still lists the files that it moves.