There was a previous topic on here about doing a very similar conversion but it would not work for me. Basically I just exported all my steam clips, and though the date/time it was originally taken is in the title, the actual metadata just gives todays date. the filenames are formatted like "clip_39210_20241210_062416.mp4, the first set being I believe the steamID of the game, the second set being the date in yyyymmdd, then third set I believe is the time it was taken. There's definitely a way to put that into the metadata in actions but anything I try doesn't seem to work. How would I get this name format to convert into the date/time of the file?
Please show us in a screenshot what you already have tried.
We can see then what details exactly could be improved.
Just to be sure:
You want to fill a field like DATE or RELEASETIME with the yyyymmdd part, right?
Or do you want to change the file date as you see it in the Windows File Explorer Properties?
A first attempt would be:
Field:
RELEASETIME
Format string:
$regexp(%_filename%,.*_.*_(.*)_(.*),$1 - $2)
Now you have to define how and what exactly you want to save into RELEASETIME.
With the above Format string you get (as you see in the preview):
20241210 - 062416
AFAIK the timestamp should follow this syntax:
yyyy-MM-ddTHH:mm:ss
(year, "-", month, "-", day, "T", hour (out of 24), ":", minutes, ":", seconds), but the precision may be reduced by removing as many time indicators as wanted. Hence valid timestamps are
yyyy
yyyy-MM
yyyy-MM-dd
yyyy-MM-ddTHH
yyyy-MM-ddTHH:mm
and
yyyy-MM-ddTHH:mm:ss
If you want to fill the fulldate and time, it would be:
Format string:
$regexp(%_filename%,.*_.*_(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2}),$1-$2-$3T$4:$5:$6)
to get
2024-12-10T06:24:16
out of
clip_39210_20241210_062416
You can adjust the hh:mm:ss content as you need, if 06 are not the hours or 24 not the minutes or 16 not the seconds.
BTW:
If you want the Format string in a shortest possible version, you could also use in this case:
$regexp(%_filename%,.*(\d{4})(\d\d)(\d\d)_(\d\d)(\d\d)(\d\d),$1-$2-$3T$4:$5:$6)
This may be true for tag fields. It is not true for file properties that are handled by the OS. These are esp. the creation date, modification date and last access.
A regular expression with %dummy% will probably not work.
Here is a suggestion for the
Format string: $regexp(%_filename%,clip_\d+_(\d\d\d\d)(\d\d)(\d\d)_(\d\d)(\d\d)(\d\d),$1-$2-$3T$4:$5:$6)


