There are several reasons for that. You can read about it here.
Some people (like me) bought a new, larger harddrive and moved their complete Music Archive to this new drive.
MediaMonkey now doesn't find the Files, having the same drive letter or not.
For that you could try Files -> Find moved/missed Tracks, but in that case it doesn't work always properly.
This Script lets you choose where you have moved the Files to and corrects the Serial-Number stored in the Library.
Attention: Make a Backup of your Library (My Documents\...\MediaMonkey\MediaMonkey.mdb) before.
Code: Select all
'1. Shutdown MediaMonkey
'2. Create the follwing Lines (without 'REM ' ) in MediaMonkey\Scripts\Scripts.ini:
REM [HDDSerial]
REM FileName=MM_HDDSerial.vbs
REM ProcName=Change_HDD_Serial
REM Order=99
REM DisplayName=Move Device Content
REM Description=Corrects broken links after exchanged harddrive
REM Language=VBScript
REM ScriptType=0
'3. Restart MediaMonkey
'4. Make sure every Device (harddrive) has a Label (Library -> Location)
'5. Select Tools -> Scripts -> Move Device Content
'6. Select on the left side the old device (harddrive)
'7. Select on the right side the new drive
'8. OK
'9. Restart MediaMonkey
'Now MediaMonkey should find all the files which where located on the old drive and are now on the new one.
Option Explicit
Sub Change_HDD_Serial()
Const PanelWidth = 200
Const PanelHeight = 100
Const objSpace = 10
Dim cntMedias
Dim arrRadioMedia()
Dim arrRadioMediaID()
Dim cntDrives
Dim arrRadioDrive()
Dim arrRadioDriveLetter()
Dim arrRadioDriveSN()
Dim arrRadioDriveTypes()
Dim SDB
Set SDB = CreateObject("SongsDB.SDBApplication")
Dim FSO
Set FSO = CreateObject("Scripting.FileSystemObject")
Dim UI
Set UI = SDB.UI
'Create the window to be shown
Dim Form
Set Form = UI.NewForm
Form.Common.ClientWidth = objSpace + PanelWidth + objSpace + PanelWidth + objSpace
Form.FormPosition = 4 ' Screen Center
Form.BorderStyle = 3 ' Dialog
Form.Caption = "Move MediaMonkey's Device Content"
Dim Label
Set Label = UI.NewLabel(Form)
Label.Caption = "from ..."
Label.Common.Top = objSpace
Label.Common.Left = objSpace
Label.Common.Width = PanelWidth
Set Label = UI.NewLabel(Form)
Label.Caption = "to ..."
Label.Common.Top = objSpace
Label.Common.Left = objSpace + PanelWidth + objSpace
Label.Common.Width = PanelWidth
Dim PanelMedia
Set PanelMedia = UI.NewPanel(Form)
PanelMedia.Common.SetRect objSpace, objSpace + Label.Common.Height + objSpace, PanelWidth, PanelHeight
'Add Medias
Dim ds
Dim RadioBtn
Dim BtnTop
Dim Caption
'Delete unused Medias
SDB.DataBase.ExecSQL ("DELETE FROM Medias WHERE (DriveType < 10) AND (IDMedia NOT IN (SELECT IDMedia FROM Songs GROUP BY IDMedia))")
BtnTop = 0
cntMedias = 0
Set ds = SDB.DataBase.OpenSQL("SELECT * FROM Medias WHERE DriveType < 10")
While Not ds.EOF
Caption = ""
'If ds.StringByName("Driveletter") <> "" Then Caption = Chr(ds.ValueByName("DriveLetter") + 65) & ": "
If ds.StringByName("Label") <> "" Then
'If Caption <> "" Then Caption = Caption & "- "
Caption = Caption & ds.StringByName("Label")
End If
If ds.StringByName("ShowLabel") <> "" Then
If Caption <> "" Then Caption = Caption & "- "
Caption = Caption & ds.StringByName("ShowLabel")
End If
If Caption = "" Then Caption = ds.StringByName("Comment")
Set RadioBtn = UI.NewRadioButton(PanelMedia)
RadioBtn.Common.Top = BtnTop
RadioBtn.Common.Width = PanelWidth
BtnTop = BtnTop + RadioBtn.Common.Height + 3
PanelMedia.Common.ClientHeight = BtnTop
RadioBtn.Caption = Caption
RadioBtn.Common.Hint = ds.StringByName("Comment")
cntMedias = cntMedias + 1
ReDim Preserve arrRadioMedia(cntMedias)
ReDim Preserve arrRadioMediaID(cntMedias)
Set arrRadioMedia(cntMedias) = RadioBtn
arrRadioMediaID(cntMedias) = ds.ValueByName("IDMedia")
ds.Next
Wend
Dim PanelDrives
Set PanelDrives = UI.NewPanel(Form)
PanelDrives.Common.SetRect objSpace + PanelWidth + objSpace, objSpace + Label.Common.Height + objSpace, PanelWidth, PanelHeight
'Add DriveLetters
BtnTop = 0
cntDrives = 0
Dim Drive
For Each Drive In FSO.Drives
If Drive.IsReady Then
Caption = Drive.DriveLetter & ":"
Caption = Caption & " - " & Drive.VolumeName
Set RadioBtn = UI.NewRadioButton(PanelDrives)
RadioBtn.Common.Top = BtnTop
RadioBtn.Common.Width = PanelWidth
BtnTop = BtnTop + RadioBtn.Common.Height + 3
PanelDrives.Common.ClientHeight = BtnTop
RadioBtn.Caption = Caption
RadioBtn.Common.Hint = CStr(Drive.SerialNumber) 'TotalSize / 1024 / 1024 / 1024
cntDrives = cntDrives + 1
ReDim Preserve arrRadioDrive(cntDrives)
ReDim Preserve arrRadioDriveLetter(cntDrives)
ReDim Preserve arrRadioDriveSN(cntDrives)
ReDim Preserve arrRadioDriveTypes(cntDrives)
Set arrRadioDrive(cntDrives) = RadioBtn
arrRadioDriveLetter(cntDrives) = Drive.SerialNumber
arrRadioDriveSN(cntDrives) = Drive.SerialNumber
arrRadioDriveTypes(cntDrives) = Drive.DriveType + 1
End If
Next
If PanelDrives.Common.Height > PanelMedia.Common.Height Then
BtnTop = PanelDrives.Common.Height
Else
BtnTop = PanelMedia.Common.Height
End If
Set Label = UI.NewLabel(Form)
Label.Caption = "Only the Database-Entries are updates. The Files aren't moved physically on the Harddisk!"
Label.Common.Top = objSpace + Label.Common.Height + objSpace + BtnTop + objSpace
Label.Common.Left = objSpace
Label.Common.Height = Label.Common.Height * 2
Label.Common.Width = Form.Common.ClientWidth - objSpace - objSpace
Label.MultiLine = True
Dim Btn
Set Btn = UI.NewButton(Form)
BtnTop = Label.Common.Top + Label.Common.Height + objSpace
Btn.Caption = SDB.Localize("&Ok")
Btn.Common.SetRect objSpace, BtnTop, PanelWidth, 25
Btn.ModalResult = 1
Btn.Default = True
Set Btn = UI.NewButton(Form)
Btn.Caption = SDB.Localize("&Cancel")
Btn.Common.SetRect objSpace + PanelWidth + objSpace, BtnTop, PanelWidth, 25
Btn.ModalResult = 2
Btn.Cancel = True
Form.Common.ClientHeight = BtnTop + 25 + objSpace
If Form.ShowModal = 1 Then 'OK
Dim SelMedia 'Media-ID
Dim SelDrive 'Drive Letter
Dim selDriveSN 'SerialNumber
Dim SelDriveType 'Drive Type
SelMedia = ""
SelDrive = ""
Dim intTemp
For intTemp = 1 To cntMedias
If arrRadioMedia(intTemp).Checked Then SelMedia = arrRadioMediaID(intTemp)
Next
For intTemp = 1 To cntDrives
If arrRadioDrive(intTemp).Checked Then
SelDrive = arrRadioDriveLetter(intTemp)
selDriveSN = arrRadioDriveSN(intTemp)
SelDriveType = arrRadioDriveTypes(intTemp)
End If
Next
If (SelDrive <> "") And (SelMedia <> "") Then
If SDB.MessageBox("Are you really sure?", 0, Array(0, 2)) = 6 Then
Set ds = SDB.DataBase.OpenSQL("SELECT * FROM Medias WHERE SerialNumber = " & selDriveSN)
If Not ds.EOF Then
SDB.DataBase.ExecSQL ("Update Songs set IDMedia = " & ds.StringByName("IDMedia") & " WHERE IDMedia = " & SelMedia)
Else
SDB.DataBase.ExecSQL ("Update Medias set SerialNumber = " & selDriveSN & ", DriveType = " & SelDriveType & " WHERE IDMedia = " & SelMedia)
End If
SDB.MessageBox "Please restart MediaMonkey", 2, Array(4)
End If
End If
End If
End Sub