writing file creation date to tag with this format : YYYYMMDD (year, month, day)


#1

Hi, I would like to write the file creation date into the "year" tag.
In fact I know how to do it with "actions" but it is writing it in this format : DD/MM/YYYY
and I prefer this format : YYYYMMDD. SO how to change the date format and write it into
a tag please?


#2

%_file_create_date% gives you DD.MM.YYYY not DD/MM/YYYY

$regexp(%_file_create_date%,(..)/(..)/(....),$3$2$1) gives you YYYYMMDD like you want it.

Edit:
How to write it into a tag:
Action: Format Value
Field: YEAR
Format String: $regexp(%_file_create_date%,(..)/(..)/(....),$3$2$1)


Rename file only if extension matches (.Mp3, .Flac, etc)
#3

The format that %_file_create_date% returns depends on your region settings in windows.
So it is possible that it returns DD/MM/YYYY

'. does not escape . You need .


#4

I tried and it works ! Thanks (and yes my date format is really DD/MM/YYYY because I'm in France)

And by the way....How to trim the last character of a tag please ? That's because I have some
old files tagged like this : "YYYYMMDD1" and I'd like to delete the "1" from the tag to make it simply "YYYYMMDD". (Of course I could do it manually but I want to create an action for it because there are
many files to process)


#5

thank you dano, i edited my post.

actually both work, at least at format value.
(thinking about it, maybe not. if . is not escaped it can be represented by any character including .)


#6

@abducted
$left(%year%,8)
gives you the first 8 characters


#7

Thanks Dano !