I just discovered that about 33% of my images did not come over to the new directory, and about 22% of .txt files did not come over. I'm baffled as to why: the popup summary didn't show any failures or find any existing files (nor should it have). The reported tracks in my library was accurate, but the artist count is not the same as what foobar2000 reports. Yesterday I assumed that the artist count mismatch was a result of having artists with no images (of which I have many), but in looking at the script I think it should report the same number of artists as my facets column. I looked over the script and don't see anything that jumps out as a problem, keeping in mind I'm a script amateur. Of the artists that are missing images and folders, the artist names do not have unusual characters, nor can I find any pattern to the misses. From what I can tell, the script seemed to skip an entire artist folder when it missed something, as opposed to just bringing over some of the images in an artist folder.
My gut tells me there is something different I need to do with the artist tf - I have lots of albums with multiple artists - but I'm not sure what else to try since $meta_branch(artist) and %<artist>% are both unrecognized by the script.
Suggestions appreciated!
Here's a vbs script that will analyze any folder contents , and export it to a excel file.
You can run it on wsh_lastfm , and then on wsh_data and compare them (sort by size) to try to identify what is missed during the migration.
Save code as folder2excel.vbs
If (WScript.Arguments.Count <> 1) Then
WScript.Quit
End If
wsh_folder = WScript.Arguments(0)
Dim oFS, oFolder
Dim objExcel, r, lnameArray, lname, nameLength
set oFS = WScript.CreateObject("Scripting.FileSystemObject")
set oFolder = oFS.GetFolder(wsh_folder)
Set objExcel = createobject("Excel.application")
objExcel.Visible = True
objExcel.Workbooks.add
'Sheet1
Set objWorksheet = objExcel.Worksheets("Sheet1")
objWorksheet.Activate
objWorksheet.Name = "Folder Sizes"
objExcel.Cells(1, 1).Value = "Folder Name"
objExcel.Cells(1, 2).Value = "Size (bytes)"
objExcel.Cells(1, 3).Value = "Size (KB)"
objExcel.Cells(1, 4).Value = "Size (MB)"
objExcel.Cells(1, 5).Value = "# Files"
objExcel.Cells(1, 6).Value = "# Sub Folders"
objExcel.Cells(1, 7).Value = "DateCreated"
objExcel.Cells(1, 8).Value = "Last Accessed"
objExcel.Cells(1, 9).Value = "Last Modified"
objExcel.Cells(1, 10).Value = "Path"
Set objRange = objExcel.Worksheets.Item(1).UsedRange
objRange.Font.Size = 12
objRange.Interior.ColorIndex = 36
objRange.Autofilter
Wscript.Sleep 300
r=2
ShowFolderDetails oFolder, r
objExcel.Columns(1).AutoFit()
objExcel.Columns(2).AutoFit()
objExcel.Columns(3).AutoFit()
objExcel.Columns(4).AutoFit()
objExcel.Columns(5).AutoFit()
objExcel.Columns(6).AutoFit()
objExcel.Columns(7).AutoFit()
objExcel.Columns(8).AutoFit()
objExcel.Columns(9).AutoFit()
objExcel.Columns(10).AutoFit()
Set objRange2 = objExcel.Range("A1")
objRange2.Range("A2").Select
objExcel.ActiveWindow.FreezePanes = "True"
'Sheet2
Set objWorksheet = objExcel.Worksheets("Sheet2")
objWorksheet.Activate
objWorksheet.Name = "Files List"
objExcel.Cells(1, 1).Value = "File Name"
objExcel.Cells(1, 2).Value = "File Path"
Set objRange = objExcel.Worksheets.Item(2).UsedRange
objRange.Font.Size = 12
objRange.Interior.ColorIndex = 36
Wscript.Sleep 300
r=2
GetFiles(wsh_folder)
objExcel.Columns(1).AutoFit()
objExcel.Columns(2).AutoFit()
'Sheet3
Set objWorksheet = objExcel.Worksheets("Sheet3")
objWorksheet.Activate
objWorksheet.Delete
'Return to Sheet1
Set objWorksheet = objExcel.Worksheets("Folder Sizes")
objWorksheet.Activate
Function ShowFolderDetails(oF,r)
Dim F
objExcel.Cells(r, 1).Value = oF.Name
objExcel.Cells(r, 2).Value = oF.Size
objExcel.Cells(r, 3).Value = Round(oF.Size /1024)
objExcel.Cells(r, 4).Value = Round(((oF.Size /1024)/1024),2)
objExcel.Cells(r, 5).Value = oF.Files.Count
objExcel.Cells(r, 6).Value = oF.Subfolders.count
objExcel.Cells(r, 7).Value = oF.DateCreated
objExcel.Cells(r, 8).Value = oF.DateLastAccessed
objExcel.Cells(r, 9).Value = oF.DateLastModified
objExcel.Cells(r, 10).Value = oF.Path
r = r+1
for each F in oF.Subfolders
ShowFolderDetails F, r
next
End Function
Function GetFiles(FolderName)
On Error Resume Next
Dim ObjFolder
Dim ObjSubFolders
Dim ObjSubFolder
Dim ObjFiles
Dim ObjFile
Set ObjFolder = oFS.GetFolder(FolderName)
Set ObjFiles = ObjFolder.Files
For Each ObjFile In ObjFiles
objExcel.Cells(r, 1).Value = ObjFile.Name
objExcel.Cells(r, 2).Value = ObjFile.Path
r = r+1
Next
Set ObjSubFolders = ObjFolder.SubFolders
For Each ObjFolder In ObjSubFolders
GetFiles(ObjFolder.Path)
Next
End Function
From cmd line run: cscript //NOLOGO folder2excel.vbs "add_folder_path_here"