#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Adam Dansky Script Function: Convert structure /Artist Name - Album Name/track 0...track N to /Artist Name/Album Name/track 0...track N #ce ---------------------------------------------------------------------------- #Include $selectedFolder = $CmdLineRaw ;Dim $szDrive, $szDir, $szFName, $szExt ;$TestPath = _PathSplit($selectedFolder, $szDrive, $szDir, $szFName, $szExt) $selectedFolderName = StringRegExpReplace(FileGetLongName($selectedFolder), "^.*\\", "") $artistAndAlbumNameParts = StringSplit($selectedFolderName, " - ", 1) $artistName = $artistAndAlbumNameParts[1] $albumName = $artistAndAlbumNameParts[2] ;MsgBox(0, "sure", $artistName & " : " & $albumName) $artistDir = _PathFull($artistName) DirMove($selectedFolder, $artistDir) $albumDir = _PathFull($artistDir & "/" & $albumName) DirCreate($albumDir) $FileList = _FileListToArray($artistDir) For $fileInf in $FileList ;MsgBox(0, "", $albumDir & " == " & $fileInf) If $albumName == $fileInf Then ;MsgBox(0, "", $fileInf) don't move album into itself, thanks Else ;MsgBox(0, "wtf!", $fileInf & " is " & FileGetAttrib($artistDir & "\" & $fileInf)) if StringInStr(FileGetAttrib($artistDir & "\" & $fileInf), "D") <> 0 Then ;MsgBox(0, "is dir", $fileInf) DirMove($artistDir&"/"&$fileInf, $albumDir&"/"&$fileInf) Else ;MsgBox(0, "is file", $fileInf) FileMove($artistDir&"/"&$fileInf, $albumDir&"/"&$fileInf) EndIf Endif Next Exit