@rEX, I don't know if you are still around / working on this, but I am very interested in this. Reason being in that I am creating a file comparer tool, that compares files in two drives that have the same track and artist name, but the folder structure of where they are stored differs significantly.
I was wondering if there was a way to view / extract the meta data of files so that I can do a comparison between the two libraries? Any thoughts? Please see attached the dump of a single artists in both drives and the difference in the file structure.
See the image here
The code to create the two files:
Code: Select all
;https://autohotkey.com/board/topic/92816-list-of-files-and-folders/
FileSelectFolder, iTunesMusicFolder, , 0, Select the location of your iTunes Folder: ;Options = 3 allows users to create a new folder. In this case, set to 0 to just allow users to select.
if iTunesMusicFolder =
{
MsgBox, You didn't select a folder.
}
else
{
SetWorkingDir, %iTunesMusicFolder%
msgbox WorkingDir is: %A_WorkingDir%
Global strFile := A_WorkingDir . "\Lister.txt"
FileDelete, %strFile%
Sub(A_WorkingDir . "\*.*", 0)
run, %strFile%
ToolTip,
;Exit
Sub(strDir, intLevel)
{
ToolTip, Level #%intLevel% %strDir%
Loop, %intLevel%
strTabs := strTabs . A_Tab
Loop, %strDir%, 2 ; scan folders
{
FileAppend, %strTabs%\%A_LoopFileName%`n, %strFile%
Sub(A_LoopFileFullPath . "\*.*", intLevel + 1) ; Recurse to subdirectory
}
Loop, %strDir%, 0 ; now scan files only
{
FileAppend, %strTabs%\%A_LoopFileName%`n, %strFile%
}
}
}
FileSelectFolder, DJMusicFolder, , 0, Select the location of your DJ Folder: ;Options = 3 allows users to create a new folder. In this case, set to 0 to just allow users to select.
if DJMusicFolder =
{
MsgBox, You didn't select a folder.
}
else
{
SetWorkingDir, %DJMusicFolder%
msgbox WorkingDir is: %A_WorkingDir%
Global strFile := A_WorkingDir . "\Lister.txt"
FileDelete, %strFile%
Sub2(A_WorkingDir . "\*.*", 0)
run, %strFile%
ToolTip,
Exit
Sub2(strDir, intLevel)
{
ToolTip, Level #%intLevel% %strDir%
Loop, %intLevel%
strTabs := strTabs . A_Tab
Loop, %strDir%, 2 ; scan folders
{
FileAppend, %strTabs%\%A_LoopFileName%`n, %strFile%
Sub(A_LoopFileFullPath . "\*.*", intLevel + 1) ; Recurse to subdirectory
}
Loop, %strDir%, 0 ; now scan files only
{
FileAppend, %strTabs%\%A_LoopFileName%`n, %strFile%
}
}
}