'====================================================================================
'
' MEDIAMONKEY SCRIPT: ExtensionToLowercase v1.1 (last updated 2007-01-02) by Steegy
' Initiated on 2006-02-17
'
' The ExtensionToLowercase script changes the file extension to lowercase for all selected files.
'
' Installation instructions:
' - Copy this script as plain text file named ExtensionToLowercase.vbs, to the MediaMonkey Scripts folder
' - Add a script entry to file Scripts.ini (example shown below)
'
' [ExtensionToLowercase]
' FileName=ExtensionToLowercase.vbs
' ProcName=ExtensionToLowercase
' Order=7
' DisplayName=ExtensionToLowercase
' Description=ExtensionToLowercase
' Language=VBScript
' ScriptType=0
'
'==========================================================================
Sub ExtensionToLowercase
Dim mySongList : Set mySongList = SDB.CurrentSongList
If mySongList.Count = 0 Then
SDB.MessageBox "Nothing selected!", mtError, Array(mbOK)
Exit Sub
End If
Dim i, mySong, Result
For i = 0 To mySongList.Count - 1
Set mySong = mySongList.Item(i)
Result = FilePathExtensionToLowercase(mySong.Path)
If Result <> "" Then
mySong.Path = Result
mySong.UpdateDB
End If
Next
End Sub
Function FilePathExtensionToLowercase(FilePath)
FilePathExtensionToLowercase = ""
Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(FilePath) Then
Dim File : Set File = FSO.GetFile(FilePath)
If FSO.GetExtensionName(File) <> LCase(FSO.GetExtensionName(File)) Then
FilePathExtensionToLowercase = File.ParentFolder.Path & "\" & FSO.GetBaseName(File) & "." & LCase(FSO.GetExtensionName(File))
End If
End If
End Function
Last edited by Steegy on Tue Apr 01, 2008 11:42 am, edited 2 times in total.
'====================================================================================
'
' MEDIAMONKEY SCRIPT: ExtensionToLowercase v1.1 (last updated 2007-01-02) by Steegy
' Initiated on 2006-02-17
'
' The ExtensionToLowercase script changes the file extension to lowercase for all selected files.
'
' Installation instructions:
' - Copy this script as plain text file named ExtensionToLowercase.vbs, to the MediaMonkey Scripts folder
' - Add a script entry to file Scripts.ini (example shown below)
'
' [ExtensionToLowercase]
' FileName=ExtensionToLowercase.vbs
' ProcName=ExtensionToLowercase
' Order=7
' DisplayName=ExtensionToLowercase
' Description=ExtensionToLowercase
' Language=VBScript
' ScriptType=0
'
'==========================================================================
Sub ExtensionToLowercase
Dim mySongList : Set mySongList = SDB.CurrentSongList
If mySongList.Count = 0 Then
SDB.MessageBox "Nothing selected!", mtError, Array(mbOK)
Exit Sub
End If
Dim i, mySong, Result
For i = 0 To mySongList.Count - 1
Set mySong = mySongList.Item(i)
Result = FilePathExtensionToLowercase(mySong.Path)
If Result <> "" Then
mySong.Path = Result
mySong.UpdateDB
End If
Next
End Sub
Function FilePathExtensionToLowercase(FilePath)
FilePathExtensionToLowercase = ""
Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(FilePath) Then
Dim File : Set File = FSO.GetFile(FilePath)
If FSO.GetExtensionName(File) <> LCase(FSO.GetExtensionName(File)) Then
FilePathExtensionToLowercase = File.ParentFolder.Path & "\" & FSO.GetBaseName(File) & "." & LCase(FSO.GetExtensionName(File))
End If
End If
End Function
thanks wrote:Is it bad to have some e.g. ".MP3" files extensions (instead of ".mp3")?
Is there some case when it's important to have lower case file extensions?
Thanks for the cool TI script, Bex.
Actually, I had a big problem once with someone once that would not work with the uppercase file extensions on mp3s. Can't remember what it was now, though--possibly something for my phone.