... und noch einmal in bunt ...
01: $filename($getEnv('USERPROFILE')'\Desktop\Mp3tag.MoveFileToFolder.cmd',ANSI)$puts(02: )'@ECHO OFF'
03: 'CLS'
04: 'CHCP 1252 >NUL'
05: 'REM #===================================================================='
06: 'REM # Mp3tag.MoveFileToFolder.cmd'
07: 'REM #'
08: 'REM # ©20140605.Detlev Dalitz'
09: 'REM # ©20140610.dkreuer (CHCP code and iTunes adaption)'
10: 'REM #--------------------------------------------------------------------'
11: 'REM # This cmd script file has been created by Mp3tag export feature
.'
12: 'REM # Export script file: "Export.CMD.20140605.MoveFileToFolder.mte'
13: 'REM #--------------------------------------------------------------------'
14: 'REM # '%_datetime%' '%_app%
15: 'REM #===================================================================='
16:
17: 'REM Set complete filepathname to iTunes executable file ...'
18: 'SET itunesExe=C:\Program Files (x86)\iTunes\iTunes.exe'
19:
20: 'REM Set iTunes media path with trailing backslash ...'
21: 'SET iTunesMediaPath=K:\Musik\iTunes\iTunes Media<!--colorc-->'
22:
23: 'REM Set complete filepathname for list file here ...'
24: 'SET FilePathListfile=%iTunesMediaPath%Mp3tag.Importlist.m3u8'
25:
26: 'ECHO.'$char(7)
27: 'CLS'
28: 'ECHO.Move file to folder'
29: 'ECHO.-------------------'
30: 'IF EXIST "%FilePathListfile%" DEL "%FilePathListfile%" & ECHO.'
31:
32: $loop(%_path%)
33: 'REM Loop '%_counter%
34:
35: 'REM Set new folderpathname with trailing backslash! ... use Mp3tag placeholders'
36: 'SET FolderPathNew=%iTunesMediaPath%'$if($eql($left(%ALBUM%,3),'Pop'),'Compilations\Pop<!--colorc-->'%ALBUM%,$if($eql($left(%ALBUM%,5),'Dance'),'Compilations\Dance<!--colorc-->'%ALBUM%,%ALBUMARTIST%'<!--colorc-->'%YEAR%' '%ALBUM%))'<!--colorc-->'
37:
38: 'REM Above path definition puts ...'
39: 'REM songs with album name Pop into folder %iTunesMediaPath%\Compilations\Pop\Pop '
40: 'REM songs with album name Dance into folder %iTunesMediaPath%\Compilations\Dance\Dance '
41: 'REM songs with other album name into folder %iTunesMediaPath%\%albumartist\%year% %album%'
42:
43: 'REM Set current filepathname ... use Mp3tag placeholders'
44: 'SET FilePathNow='%_path%
45:
46: 'REM Set current folderpathname ... use Mp3tag placeholders'
47: 'SET FolderPathNow='%_folderpath%
48:
49: 'REM Set current filename ... use Mp3tag placeholders'
50: 'SET FileName='%_filename_ext%
51:
52: 'REM Set progress counter'
53: 'SET Progress='%_counter%
54:
55: 'ECHO. %Progress%: %FileName% -^> %FolderPathNew%'
56:
57: 'IF NOT EXIST "%FolderPathNew%" MD "%FolderPathNew%"'
58: 'MOVE /Y "%FilePathNow%" "%FolderPathNew%" >NUL'
59:
60: 'IF NOT ERRORLEVEL 1 ('
61: ' CHCP 65001 >NUL & REM Codepage for Playlistfile must use UTF-8'
62: ' ECHO.%FolderPathNew%%FileName%>>"%FilePathListfile%"'
63: ' REM DIR /P/A/N/O "%FolderPathNew%%FileName%"'
64: ' CHCP 1252 >NUL & REM Codepage for filenames must use ANSI Western'
65: ')'
66: 'IF ERRORLEVEL 1 PAUSE'
67:
68: $loopend()
69:
70: 'ECHO.Are you ready to invoke iTunes?'
71: 'ECHO.'
72: 'ECHO.Type [Y] and press [Enter], or press just [Enter] to abort ...'
73: 'SET YesNo='
74: 'SET /P YesNo='
75: 'IF /I [%YesNo%] NEQ [Y] GOTO :CANCEL'
76:
77: 'IF EXIST "%FilePathListfile%" START "iTunes" /MAX "%iTunesExe%" "%FilePathListfile%"'
78:
79: ':CANCEL'
80: 'DEL "%~0" 1>NUL 2>NUL & EXIT'
81: 'REM ====================================================================='
DD.20140611.0828.CEST