ISDBSongData::SetPathByMask: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
|  (Created page with "{{MethodDeclaration|SDBSongData|ISDBSongData|Method SetPathByMask(Mask As String)}}  ===Method description===  Similar to Path property and RenameByMask method, but allows you to...") | 
| (No difference) | 
Latest revision as of 16:47, 26 September 2013
CoClass SDBSongData, Interface ISDBSongData
Method SetPathByMask(Mask As String)
Method description
Similar to Path property and RenameByMask method, but allows you to set path according to Mask without moving the file. The file itself is moved once UpdateDB is called.
Example script:
Option Explicit
Sub OnStartUp()
    Dim oMenuItem
    Set oMenuItem = SDB.UI.AddMenuItem(SDB.UI.Menu_Pop_TrackList, 0, 0)
    oMenuItem.Caption = "PathByMask"
    oMenuItem.OnClickFunc = "Test"
    oMenuItem.UseScript = Script.ScriptPath
End Sub
Sub Test(oMenuItem)
    Dim oSongData   
    Set oSongData = SDB.SelectedSongList.Item(0)
    oSongData.SetPathByMask( SDB.Tools.UFText2Mask _
        ("C:\Music\<Genre>\<Album Artist>\<Album>\<Track#:2> - <Title>"))
    SDB.MessageBox oSongData.Path, mtInformation, Array(mbOK)
    oSongData.DiscardChanges
    SDB.MessageBox oSongData.Path, mtInformation, Array(mbOK)
End Sub
Added in MediaMonkey version 4.1
