Current Setup:
Music (folder)
Continuum_John_Mayer_2006 (Folder)
Waiting on the World to Change.mp3
Belief.mp3
Vultures.mp3
Just a Little Love_Reba_McEntire_1984 (Folder)
Just a little love.mp3
Poison Sugar.mp3
If Only.mp3
Ect....
Proposed Setup:
Music (folder)
Continuum_John_Mayer_2006 (Folder)
Waiting on the World to Chance_Mayer.mp3
Belief_Mayer.mp3
Vultures_Mayer.mp3
Just a Little Love_Reba_McEntire_1984 (Folder)
Just a little love_McEntire.mp3
Poison Sugar_McEntire.mp3
If Only_McEntire.mp3
Ect....
I've been able to work out creating a list of folders and parse out section (last name) that I need. What I can't figure out is how to loop through that list and take last name and add it to the end of each file within that corresponding folder.
Code: Select all
FileList := ""
Path := "E:\Music\*"
;msgbox, %path%
Loop, Files, %Path%, D
FileList .= A_LoopFileFullPath "`n"
msgbox, % FileList
Loop, parse, FileList, `n
{
if (A_LoopField = "") ; Ignore the blank item at the end of the list.
continue
SplitName := StrSplit(A_LoopField, "_") ; Omits periods.
MsgBox % SplitName[3]
MsgBox, 4,, File number %A_Index% is %A_LoopField%. Continue?
IfMsgBox, No
break
}