1
我使用2个脚本通过文件夹内的年份torrent文件进行重新排版,但每个脚本都不完整,因为我必须同时使用它们来移动它们。将文件夹移动到文件夹中移动
例如
1脚本
@Echo Off
For %%a In (*19???.torrent *20???.torrent) Do Call :Sub "%%~a"
Exit/B
:Sub
Set "mfn=%~n1"
Set "lfc=%mfn:~-5%
Set "lfc=%lfc:(= %"
Set "lfc=%lfc:)= %"
Set "lfc=%lfc: =%"
If Not Exist "%lfc%\" MD %lfc%
Move %1 %lfc%
不要动文件,如(文件扩展名的.torrent)
Animali Pazzi (1939) Toto
Anno 2000 La Corsa Della Morte
American History X 1998 1080p ENG
Devil 2010_001
第二脚本
@Echo Off
For /F "Tokens=*" %%a In (
'Dir/B/A-D *.torrent^|Findstr/R "\<19[0-9][0-9]\> \<20[0-1][0-9]\>"') Do (
For %%b In (%%~na) Do Call :Sub "%%a" "%%b")
Pause
Exit/B
:Sub
Set "mfn=%~2"
Set "mfn=%mfn:(=%"
If %mfn:)=% GEq 1900 (If %mfn:)=% Lss 2017 (If Not Exist "%mfn:)=%\" MD %mfn:)=%
Move %1 %mfn:)=%))
但不移动文件,如
Alla 39 Eclisse - The Awakening 1980_001
Predators 2010_002
Sono il Numero Quattro.2011_001
Abbronzatissimi.1991.avi
Continuavano a chiamarlo trinita1971 x264
32.Dicembre.1988.avi
我想这两个脚本,解决这个问题,移动的融合。
您可以用[这](http://stackoverflow.com/a/39345515/2861476)试试。 –
该解决方案正确创建文件夹,不会移动文件。我尝试添加我的代码,但出现错误 –
它在答案中显示。出于调试目的,'move'命令前缀有一个'echo'。如果输出到控制台是正确的,则移除'echo'离开'move'。 –