在其名称中的模式考虑父文件夹排序文件到文件夹中基于使用的.bat
C:\Users\..\Parent
在父母有3个文件夹M1,M2,M3
C:\Users\..\Parent\M1
C:\Users\..\Parent\M2
C:\Users\..\Parent\M3.
在M1,M2 ,M3有100个子文件夹。
C:\Users\..\Parent\M1\MattP001M1
C:\Users\..\Parent\M1\MattP002M1
so on till
C:\Users\..\Parent\M1\MattP100M1.
类似地对于M2,M3也是如此。
在每个文件夹(MattP001M1..MattP100M1)有一吨的.wav文件(接近1500上的平均值)。 这些wav文件在其命名中有一个模式。 例如:有German_09mea4567_morename
20个文件和German_4132azzi_morename
等15个文件。 我正在使用此脚本将它们分组在基于(09mea4567)之后的独特部分的文件夹中。
SETLOCAL ENABLEDELAYEDEXPANSION
for %%a in (*.wav) do (
set f=%%a
set g=!f:~7,8!
md "!g!" 2>nul
move "%%a" "!g!"
)
现在,这是罚款,一个文件夹。我想为M1(MattP001M1,..,MattP100M1),M2,M3下的所有文件夹执行此操作。
请注意:这是一台机器上的设置。在另一台机器上而不是德语上有另一种语言。
希望我让自己更清楚了。
@foxidrive感谢您的编辑。对不起,现在测试 – Matt