Set File Time w/ custom column value extracted from name

General discussion related to "Everything".
Post Reply
klark1kent
Posts: 17
Joined: Thu Aug 11, 2022 1:26 am

Set File Time w/ custom column value extracted from name

Post by klark1kent »

I'm trying to use the Set File Time menu option under Edit -> Advanced, using a value stored in a custom column, that's represented by a custom property entry. I do understand that when using Custom for any of the date fields, if referencing an another existing column you must use a format like this one: $property-system:system.itemdate:

I also understand that the date/time entry should be formatted as ISO 3601.

In this case what I'm doing is using REGEX_EXTRACT to pull the date value from the filename, and then joining that date value with a 'dummy' time for the rest of the ISO 3601 string (because I don't care about the exact time). I have this being calculated in Column1, but because I'm having issues, I also added a Column2 that just formats column1 column using FORMATFILETIME (likely incorrect to do this)

Neither is working - what syntax or what am I missing to allow Set File Tame to use a custom column value to set date-created:?? I want date created column to reflect the date time in Column 1

regex:name:(\d{4}\-\d{2}\-\d{1,2}) column1:=REGEX_EXTRACT($Name:,"\d{4}\-\d{2}\-\d{1,2}")"T21:42:32.259809" add-column:column1 column-2:=FORMATFILETIME($column-1:) add-column:column2

image.png
image.png (31.9 KiB) Viewed 79 times
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Set File Time w/ custom column value extracted from name

Post by void »

The Set File Time custom date/time only supports the preprocessor (not formulas yet)

Please try the following Set File Time custom date/time:

<REGEX_EXTRACT:$Name:,"\d{4}\-\d{2}\-\d{1,2}">T21:42:32.259809


<REGEXEXTRACT:...>
klark1kent
Posts: 17
Joined: Thu Aug 11, 2022 1:26 am

Re: Set File Time w/ custom column value extracted from name

Post by klark1kent »

EDIT: NEVERMIND, YES, that is what you were saying. It worked.

thanks! Now we just need to be able to save these custom strings as preset in the set file time window like the rename window, and we'd be set :)

Are you saying put this exact string in the Custom field of the Set File Time window?

<REGEX_EXTRACT:$Name:,"\d{4}\-\d{2}\-\d{1,2}">T21:42:32.259809
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: Set File Time w/ custom column value extracted from name

Post by void »

Yes, put the text into the set file time custom field.

There's no preview yet.
I have on my TODO list to improve the preprocessor support for the UI.

For now, you can use the Advanced rename (Shift + F2) dialog to get a preview.
But don't rename the file, just use the dialog to setup your preprocessor text.
Post Reply