INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Save and retrieve date in filename  (Read 1322 times)

zendoo

  • Recent member
  • *
  • Posts: 44
Save and retrieve date in filename
« 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
Logged

Scolex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1116
  • Cheers
Re: Save and retrieve date in filename
« Reply #1 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.
Logged
Sean

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Save and retrieve date in filename
« Reply #2 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])

Logged
The opinions I express represent my own folly.

zendoo

  • Recent member
  • *
  • Posts: 44
Re: Save and retrieve date in filename
« Reply #3 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!)...
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42445
  • Shoes gone again!
Re: Save and retrieve date in filename
« Reply #4 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.
Logged
Matt Ashland, JRiver Media Center

zendoo

  • Recent member
  • *
  • Posts: 44
Re: Save and retrieve date in filename
« Reply #5 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!
Logged
Pages: [1]   Go Up