[REQ] Plugin for changing timestamp based on filename

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Yuta
Member
Member
Posts: 145
Joined: 2007-03-27, 16:52 UTC
Location: Argentina

[REQ] Plugin for changing timestamp based on filename

Post by *Yuta »

It's very common to download your pictures from your phone to find out that the date isn't preserved. Nevertheless, it's common that the filename be with the time data.
Normally, the format is something as this: "YYMMDD_hhmmss.jpg"

The new change attributes with plugins don't let you use filenames as input data, only plugins of dates or times are allowed.

This could be done with a new plugin.
Should be configurable, in this case could be something like [plugin.0YYMMDD] for the writedate plugin and [plugin.7hhmmss] for the writetime plugin.

The first number defines the offset and the following characters the format.

What do you guys think?. Maybe Hacker read this post and he likes the idea. :lol:
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Actually I'd love to have a more general solution - communication between plugins, so one wdx plugin could set a field using a field taken from another.
This would be enough for the task you described.
User avatar
Flint
Power Member
Power Member
Posts: 3505
Joined: 2003-10-27, 09:25 UTC
Location: Belgrade, Serbia
Contact:

Post by *Flint »

m^2 wrote:Actually I'd love to have a more general solution - communication between plugins, so one wdx plugin could set a field using a field taken from another.
Hm... But this is actually present in TC! Open Change Attributes dialog, add the new plugin field to change, press [+] to add a field from any other plugin... Or did I understand you wrong?

But this is not enough in this case. It is necessary to convert text into time/date format. I'm not sure, but maybe Script Content Plugin is able to help with this task.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 11.03 / Win10 x64
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Flint wrote:
m^2 wrote:Actually I'd love to have a more general solution - communication between plugins, so one wdx plugin could set a field using a field taken from another.
Hm... But this is actually present in TC! Open Change Attributes dialog, add the new plugin field to change, press [+] to add a field from any other plugin... Or did I understand you wrong?

But this is not enough in this case. It is necessary to convert text into time/date format. I'm not sure, but maybe Script Content Plugin is able to help with this task.
Hey, that's it :D
It seems that the Change Attributes dialog is one if the most powerful things in TC.
Thanks, Flint :D
User avatar
Lefteous
Power Member
Power Member
Posts: 9536
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Yuta
Hi,
Normally, the format is something as this: "YYMMDD_hhmmss.jpg"
Please add "tc.writedate" to the list of custom attributes and set the value to

Code: Select all

[=tc.name:5-6].[=tc.name:3-4].[=tc.name:1-2] [=tc.name:8-9]:[=tc.name:10-11]
The format used above is commonly used in Germany. This works great for me but I don't know if this works independently from the local date/time format.
User avatar
Yuta
Member
Member
Posts: 145
Joined: 2007-03-27, 16:52 UTC
Location: Argentina

Post by *Yuta »

Lefteous wrote:2Yuta
Hi,
Normally, the format is something as this: "YYMMDD_hhmmss.jpg"
Please add "tc.writedate" to the list of custom attributes and set the value to

Code: Select all

[=tc.name:5-6].[=tc.name:3-4].[=tc.name:1-2] [=tc.name:8-9]:[=tc.name:10-11]
The format used above is commonly used in Germany. This works great for me but I don't know if this works independently from the local date/time format.
Thanks, thanks, thanks, thanks, thanks, thanks, thanks, thanks.
It worked like a charm!. It'd never crossed my mind to even try something like that!.
The format writedate uses, is not published, I don't know where you took it from, but this completely addresses the problem!.

I think it should be more publicly known, that you can do something like this. Like being at the help.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

To all other users:
Be warned that Total Commander expects the file date in this field exactly in the order as it is listed in the file list!

So if you see Month/Day/Year in the file list, you will have to provide the date in this form too in the change attributes dialog.
Author of Total Commander
https://www.ghisler.com
Post Reply