将文件夹名称移至#,[A-Z]

时间:2019-11-11 07:17:15

标签: batch-file

我想对字母文件夹名称移动到文件夹#,[A-Z]

进行排序

感谢您的帮助。

示例。

文件夹名称:

10 Cloverfield Lane (2016) ---> move to folder #
12 Rounds (2009) ---> move to folder #
12 Rounds 2 Reloaded (2013) ---> move to folder #
12 Rounds 3 Lockdown (2015) ---> move to folder #
12 Strong (2018) ---> move to folder #
13 Hours The Secret Soldiers of Benghazi (2016) ---> move to folder #
2 Fast 2 Furious (2003) ---> move to folder #
2012 (2009) ---> move to folder #

A Good Day to Die Hard (2013) ---> move to folder A
A Man Apart (2003) ---> move to folder A
A Million Ways to Die in the West (2014) ---> move to folder A
A Quiet Place (2018) ---> move to folder A
A View to a Kill (1985 ---> move to folder A
A-X-L (2018) ---> move to folder A
ATM Er Rak Error (2012) ---> move to folder A

Bad Boys (1995) ---> move to folder B
Bad Boys II (2003) ---> move to folder B
Bad Moms (2016) ---> move to folder B

1 个答案:

答案 0 :(得分:0)

scipt不要移动目录,我需要移动目录。

for %%I in (0 1 2 3 4 5 6 7 8 9) do if exist "%%I*" md "D:\test\#" 2>nul & move "%%I*" "D:\test\#\"

for %%I in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I*" md "D:\test\%%I" 2>nul & move "%%I*" "D:\test\%%I"