Page 1 of 1

Change attributes: get date/time from file name?

Posted: 2012-02-02, 13:24 UTC
by krapet
Modify: Change date/time using Multi-rename tool rules

I miss possibility to change date/time of files by the filename.
For example filename for "My photo 20120131.jpg" I would like to set date 31.1.2012 so in "Date" filed I will put:

Code: Select all

[N16-17].[N14-15].[N10-13]
For multiple files it can look like this.

.

Posted: 2012-02-02, 15:19 UTC
by ghisler(Author)
Internal fields are not supported there, but you can use content plugins. The above would look like this:
[=tc.Name:16-17].[=tc.Name:14-15].[=tc.Name:10-13]

This will only work in the plugins part, so use the tc - modification date value.

Posted: 2012-02-02, 15:56 UTC
by krapet
Thanks for answer.

Just note.
No preview is available, nor for the first file.
It is a little uncomfortable.

Instruction for other users:
Change plugin attributes: ticked
(click on More attributes)
Plugin: tc
Property: write date
Value: [=tc.Name:16-17].[=tc.Name:14-15].[=tc.Name:10-13]

It was tested and works (for FAT32 and NTFS) when writedate/writetime is selected.

Modification of drop down menu: Change plugin attributes

Posted: 2012-10-22, 13:22 UTC
by krapet
File => Change attributes => Change plugin attributes => More attributes

Currently in drop down menu (button [+] ) are available all items for tc.comments property only.
http://imageshack.us/a/img829/6994/tcchangeattrpluginscomm.png

Could you make them (or at least "fullname", "name", "ext", "path") available also for other properties:
> creationdate
> creationtime
> writedate
> writetime
> accessdate
> accesstime
http://imageshack.us/a/img577/1341/tcchangeattrpluginscrea.png

Posted: 2012-10-22, 13:27 UTC
by ghisler(Author)
TC only shows compatible fields. But if you enter a field manually, TC tries to convert the string value to the destination field as good as it can. But normally it makes no sense to convert a comment to a creation date.

Posted: 2012-10-23, 07:26 UTC
by af09940
I have Files with diffent namelength and date behind (
firstfilename 2012-02-26 19-21.txt
secondfilename 2012-05-12 20-54.yyy
)

Is there any way to count the namestring from the end to get the date?

Posted: 2012-10-23, 07:39 UTC
by MVV
Just try to use negative indexes. E.g. [=tc.Name:-16-13] for year (just check what you get with multi-rename tool).

Posted: 2012-10-23, 09:02 UTC
by af09940
OK - I tried it all...

I named a Testfile as 11111111111111111990.txt.

I tested the above shown string to see it´s working in any way and it works for normal changing the writedate.

But when I use the "-" before the position number ([=tc.Name:-1-4]) to count from the right side 4 characters backwards I only get the year 2000!!!

No matter what the filename says the last four characters (2010 or 2011 or 1990). Always it is 2000 by using negative counting.

What can I do else?

Posted: 2012-10-23, 16:57 UTC
by sqa_wizard
Just use [=tc.Name:-4-1]

Posted: 2012-10-24, 08:12 UTC
by af09940
You are right - it should be -4-1... But it still doesn´t work. Did you try it? May be I´m wrong in any way...

I only get the year 2000 - no matter what the filename says...

Any other suggestions?

Posted: 2012-10-24, 10:49 UTC
by white
af09940 wrote:Any other suggestions?
Forgot to check the checkbox "Change plugin attributes"?
Mixing up creation date/write date?

Does the expression show the correct value in the multi rename tool?

Can you post a screen shot of what you are doing?

Posted: 2012-10-25, 14:08 UTC
by ghisler(Author)
Just use -4- for all the characters after the 4th-last.

Or use -4,4 (which means from the 4th-last with a length of 4).