Need a script to change the date in the "added" field

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Need a script to change the date in the "added" field

Postby freshair » Sun Sep 25, 2011 8:45 pm

I just rebuilt my MM library from backups after my hard drive crashed. Sadly, every date in the "Added" field for each file was reset to today's date.

Does anyone have a script that will modify the MM date used in the "added" field in my library to the "date created" field in the properties for each audio file?
Last edited by freshair on Sun Sep 25, 2011 10:55 pm, edited 1 time in total.
freshair
 
Posts: 3
Joined: Sat Sep 24, 2011 4:34 pm

Re: Need a script to change the date in the "added" field

Postby Eyal » Sun Sep 25, 2011 9:32 pm

Skins for MediaMonkey: Cafe, Carbon, Helium, Spotify, Zekton. [ Wiki Zone ].
Eyal
 
Posts: 3052
Joined: Sun Jun 26, 2005 9:27 am
Location: Québec

Re: Need a script to change the date in the "added" field

Postby freshair » Sun Sep 25, 2011 10:54 pm

Eyal wrote:Try this: viewtopic.php?f=4&t=51079


OK, that works if I'm trying to replace one MM "field" with the data from another MM "field". But I've realized that I don't want to use the Timestamp field because if I ever changed file properties (like changing the type of genre), Timestamp reflects the files last modified date.

I need a script/tool that can replace the "added" field with a file system property I don't see tracked by MM, "created" date.

I'm only half-geek and I don't see anything here. Am I missing something?
freshair
 
Posts: 3
Joined: Sat Sep 24, 2011 4:34 pm

Re: Need a script to change the date in the "added" field

Postby nohitter151 » Sun Sep 25, 2011 10:58 pm

freshair wrote:
Eyal wrote:Try this: viewtopic.php?f=4&t=51079


OK, that works if I'm trying to replace one MM "field" with the data from another MM "field". But I've realized that I don't want to use the Timestamp field because if I ever changed file properties (like changing the type of genre), Timestamp reflects the files last modified date.

I need a script/tool that can replace the "added" field with a file system property I don't see tracked by MM, "created" date.

I'm only half-geek and I don't see anything here. Am I missing something?

Scripts don't have access to any file properties that are not accessible in MM. Anyway if you copy Timestamp to Added, it is only copied one time. If the timestamp is changed after you run the script the first time, the Added field would not also update.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?
nohitter151
 
Posts: 21426
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA

Re: Need a script to change the date in the "added" field

Postby freshair » Sun Sep 25, 2011 11:09 pm

Thanks! This will get me 95% the way to my goal (the other 5% contained Timestamps from edits).

The one thing I didn't know (and you clarified) is what attributes were in play. Ergo, if Timestamps are pulling from the original file property "Modified" date, I wanted to make sure I wasn't overlooking somewhere in MM a field that held the "created" date.
freshair
 
Posts: 3
Joined: Sat Sep 24, 2011 4:34 pm

Re: Need a script to change the date in the "added" field

Postby ZvezdanD » Thu Sep 29, 2011 10:58 am

You could use the RegExp Find & Replace add-on and its "Assign date/time when file is created to Timestamp field" preset, just select Added in the Into combo box instead of Timestamp. However, keep in mind that sometimes the date when a file is created could be newer then the date when it is modified. For example, if you copy a file after its modification, a copied version would have newer the date created.
Magic Nodes 4.2 (2011-07-01) RegExp Find & Replace 4.3 (2011-07-06)  Invert Selection/Select None 1.5 (2012-02-04)  Export M3Us/Create Playlists for Child Nodes 3.6.1 (2012-01-09)  Expand Child Nodes/Expand All 1.1.1 (2012-02-13)  Event Logger 2.4.1 (2012-02-06)  Filtered Statistics Report 1.5.1 (2009-10-09)  Track Redirection & Synchronization 3.4 (2012-10-08)  Restore/Synchronize Database 3.1.1 (2012-05-31)  Find Currently Playing Track 1.2 (2012-02-14)  Queue List 1.2 (2012-02-06)  Add to Library on Play 1.0 (2010-10-20)  Tree Report for Child Nodes 1.1 (2010-11-04)  Update Location of Files in Database 1.3.3 (2012-06-12)  Inherit Child Playlists 1.0 (2012-01-16)
Add Currently Playing/Selected Track(s) to Playlist 1.1.1 (2012-02-06)
ZvezdanD
 
Posts: 2589
Joined: Thu Jun 08, 2006 7:40 pm


Return to Need Help with Addons?

Who is online

Users browsing this forum: Rednroll and 25 guests