INTERACT FORUM

Please login or register.

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

Author Topic: Fill Properties From Filename - Any way to convert date format from yyyyMMdd?  (Read 1575 times)

nopso66

  • Member
  • *
  • Posts: 2

Hi - I have a few thousand movie shorts archived, which I have sorted by filename in their individual playlists. The filename begins with the release date, which I have placed in a yyyyMMdd format for chronological sorting purposes. This is followed by the name of the movie, separated by a dash, i.e., "Woody Woodpecker" released on July 7, 1941 is:

Quote
19410707 - Woody Woodpecker.avi

What I'd like to do is use the "Fill Properties From Filename" to separate out the date from the filename into the Date tag field, but I can't figure out a way to convert the format to one the field will recognize. I confess I get a bit lost when trying to go "under the hood" and navigate the expressions and variables involved in the custom automated processes of which JR is capable.

Does anyone have any ideas how I might be able to accomplish this goal? If I can find a method to automate the process, I'd much rather do that than input the dates manually.  :)

Thanks for your time.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640

Unfortunately, you can't do that directly from Fill Properties from Filename. I wish that tool was a little more clever with how it let you configure value parsing, but it's not.

However, you can still do what you need to do, by parsing the filename directly using an expression, as long as all your files are in exactly the same yyyymmdd format at the start of the filename.

Go into a regular view, and find a file in the file list. Simply pick a file, click in the [Date] column cell to edit it (or hit F2), and paste in this value:
Code: [Select]
=ConvertDate(Mid([Filename (name)],4,2)//Mid([Filename (name)],6,2)//Mid([Filename (name)],0,4))
And your date field will be set correctly.  Shazaam.

If you like the results, and all your filenames are suitably standardized, select as many as you like, making sure you click on the [Date] column when you select the last one.  Then when you hit F2, you will be editing the date field for all selected files.  Paste in the expression I gave you, and hit enter.  Done.
Logged

nopso66

  • Member
  • *
  • Posts: 2

Thank you. Before I read this reply, I ended up just removing the files from the library, bulk renaming them using a yyyy-MM-dd format, then re-imported them. That worked spiffily. But I'll keep your solution handy, in case I need it again.  :)
Logged
Pages: [1]   Go Up