by ZvezdanD » Tue Mar 31, 2009 12:24 pm
If you want to apply mentioned preset to the Timestamp field, and consecutively to update the Date Modified value of the file, you should first open Tools / Options dialog box, go to Library / Tags & Playlists, turn ON the "Update tags when editing properties" and turn OFF "Modify timestamp when updating tags".
If you use mentioned preset to store information about Date Created to some Custom field, such information are written in the date/time format which is adjusted with your Windows Regional settings. This format in many cases is not very well for sorting purposes if it is treated as a string and only solution is to store date/time in "YYYY-MM-DD HH:MM:SS" format. I could modify preset to store Date Created in such format, but such expression could be very long and probably much slower. If you really need such thing, you could add the following code to the c:\Program Files\MediaMonkey\Scripts\Auto\RegExpReplace.vbs file, for example with Notepad:
Code: Select all
Function DateTimeISO(sDateTime)
DateTimeISO = Year(sDateTime) & "-" _
& Right("0" & Month(sDateTime), 2) & "-" _
& Right("0" & Day(sDateTime), 2)& " " _
& Right("0" & Hour(sDateTime), 2) & ":" _
& Right("0" & Minute(sDateTime), 2) & ":" _
& Right("0" & Second(sDateTime), 2)
End Function
After that you should restart MM and modify the
Replace with string in the mentioned preset with the next string:
Code: Select all
IIf(CreateObject("Scripting.FileSystemObject").FileExists(oSongData.Path), DateTimeISO(CreateObject("Scripting.FileSystemObject").GetFile(IIf(CreateObject("Scripting.FileSystemObject").FileExists(oSongData.Path), oSongData.Path, Script.ScriptPath)).DateCreated), "$&")
Those modifications would be implemented in the next version of the script.
If you want to apply mentioned preset to the Timestamp field, and consecutively to update the Date Modified value of the file, you should first open Tools / Options dialog box, go to Library / Tags & Playlists, turn ON the "Update tags when editing properties" and turn OFF "Modify timestamp when updating tags".
If you use mentioned preset to store information about Date Created to some Custom field, such information are written in the date/time format which is adjusted with your Windows Regional settings. This format in many cases is not very well for sorting purposes if it is treated as a string and only solution is to store date/time in "YYYY-MM-DD HH:MM:SS" format. I could modify preset to store Date Created in such format, but such expression could be very long and probably much slower. If you really need such thing, you could add the following code to the c:\Program Files\MediaMonkey\Scripts\Auto\RegExpReplace.vbs file, for example with Notepad:
[code]Function DateTimeISO(sDateTime)
DateTimeISO = Year(sDateTime) & "-" _
& Right("0" & Month(sDateTime), 2) & "-" _
& Right("0" & Day(sDateTime), 2)& " " _
& Right("0" & Hour(sDateTime), 2) & ":" _
& Right("0" & Minute(sDateTime), 2) & ":" _
& Right("0" & Second(sDateTime), 2)
End Function
[/code]
After that you should restart MM and modify the [i]Replace with[/i] string in the mentioned preset with the next string:
[code]IIf(CreateObject("Scripting.FileSystemObject").FileExists(oSongData.Path), DateTimeISO(CreateObject("Scripting.FileSystemObject").GetFile(IIf(CreateObject("Scripting.FileSystemObject").FileExists(oSongData.Path), oSongData.Path, Script.ScriptPath)).DateCreated), "$&")[/code]
Those modifications would be implemented in the next version of the script.