MS-DOS 的批处理编码
我想通过批量编码对文件进行排序和移动,这可能吗?
比方说,我在文件夹中有以下文件列表:
A1.txt
C1.txt
A1.pdf
C1.doc
A1.doc
B1.pdf
B1.txt
C1.pdf
B1.doc
当我在批处理脚本中运行不带参数和编码文件名的DOS批处理文件时,批处理文件将对文件进行排序并根据文件名创建文件夹。
“A1.txt A1.pdf A1.doc”应移动到名为 A1 的文件夹中,该文件夹会自动创建,同样,应创建 B1 和 C1 文件夹,文件应移动到其文件夹中。
I would like to sort and move files with batch coding, is that possible?
Let's say, I have following files lists in folder :
A1.txt
C1.txt
A1.pdf
C1.doc
A1.doc
B1.pdf
B1.txt
C1.pdf
B1.doc
When I run the DOS batch file without parameters and coding file name in batch scripting, The batch file will sort the file and create folder according to file name.
"A1.txt A1.pdf A1.doc" should move in folder called A1 which is automatically, likewise, B1 and C1 folder should be created, the files should be moved in their folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您确实想要一个Windows批处理文件,
请运行“help for”以获取有关“for”和“~”符号的文档。
(为批处理文件编写。如果要从提示符运行命令,请使用一个“%”而不是两个。)
If you actually want a Windows batch file,
Run "help for" for documentation on "for" and the "~" notation.
(Written for a batch file. If you want to run the command from the prompt, use one "%" instead of two.)