INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: zendoo on April 01, 2012, 10:13:24 pm

Title: Save and retrieve date in filename
Post by: zendoo on April 01, 2012, 10:13:24 pm
Is there already a way to rename, move and copy an image with the date in the filename that can then retrieve this date when using fill properties from filename INCLUDING THE TIME (HH.MM.SS!)?



(Why? Tags get damaged, moving files from one library to another, ... This way my info - the date - is "safe" as it is stored in the filename)

THANKS
Title: Re: Save and retrieve date in filename
Post by: Scolex on April 01, 2012, 10:35:38 pm
I don't know how to do it with seconds but you can get month_day_year hour_minute by using Tools>Library Tools>Rename, Move, & Copy Files
See example below
Edit:
In the example below if you use [Date (filename friendly)] instead of [Date] you will get 20080522-212423 I assume the 23 is seconds but I am not sure.
Title: Re: Save and retrieve date in filename
Post by: MrC on April 02, 2012, 12:18:44 am
Here's how to write out a date in a format that you can read later in human readable format.  We'll assume [Name] is included, but you can change this.  Let's write out the time in a basic ISO time format.

Rename using File rule:

   [name] - FormatDate([Date,0],  %Y-%m-%dT%H%M)

Since Fill Properties from Filename does not use expressions, you can instead grab the date from the filename and use an expression to assign the date directly in the Date field directly.  Assuming the filename as formmated above, the following entered into the Date tag (inplace editting, or Tag Action Window) will set the date from the filename:

   =convertdate(regex(filename(,0), /# - (\d{4}-\d{2}-\d{2}T\d{2})(\d{2})$#/,-1)[R1]:[R2])

Title: Re: Save and retrieve date in filename
Post by: zendoo on April 02, 2012, 10:15:12 am
THANKS ! COOL!

is there a way to regex the date from the a [date (filenamefriendly)] named file? (((uff, if i could only understand the expression language a bit better)))
this way i could keep the files named as they are (  [Date (filename friendly)] - [Caption] {[places] - [people]}([Access Rating])   ) and wont get  filename (1).jpg, filename (2).jpg for all the files that have the same name and same date except for the seconds (i have quite some of those!)...
Title: Re: Save and retrieve date in filename
Post by: Matt on April 02, 2012, 10:18:29 am
'Fill Properties From Filename' in Automatic mode should get the date without having to do anything smart, assuming you used [Date (filename friendly)] to build the filename.
Title: Re: Save and retrieve date in filename
Post by: zendoo on April 02, 2012, 10:22:19 am
'Fill Properties From Filename' in Automatic mode should get the date without having to do anything smart, assuming you used [Date (filename friendly)] to build the filename.


WOW THAT IS SOOOO COOL !!! :o

never saw this new little option of retrieve automatically!

YOURE ALL MY HEROS!