Automated Date/time change using info from filename

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
zyx4321
New Member
New Member
Posts: 1
Joined: 2011-07-16, 21:09 UTC

Automated Date/time change using info from filename

Post by *zyx4321 »

Hi,

I'm new to Total Commander, and testing it due to its multiple rename function, that I found very useful.

However, I'm trying to find a way to change date/time using a rule taken from the name of files, and I did not found a way.

Example:
Starting with Filenames and date time
Disk 1 - Track 1.mp3 07/18/2011 17:36
Disk 1 - Track 2.mp3 07/18/2011 17:37
Disk 1 - Track 3.mp3 07/18/2011 17:39
Disk 2 - Track 1.mp3 07/18/2011 17:55
I want to change them to
Disk 1 - Track 1.mp3 07/18/2011 1:01
Disk 1 - Track 2.mp3 07/18/2011 1:02
Disk 1 - Track 3.mp3 07/18/2011 1:03
Disk 2 - Track 1.mp3 07/18/2011 2:01
Is it any way to do this in batch with Total Commander?
I want to take some numbers from the name of the files and use them as date/time to make a personalized order for music files (grouping album together). I taken the idea from what a friend do with time of sources, he change them to contain the version of the file...
(Example: Source.cpp 07/18/2011 01.44.07 means, for him, that source file is version 1.44.07)

Any suggestion?[/b]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50930
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You can't change the time stamps with the multi-rename tool, but you can use the tool addtime from our addons page:
http://www.ghisler.com/tools.htm#other
Author of Total Commander
https://www.ghisler.com
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

Hello zyx4321,

I've slightly modified my SetFolderDate addon. It should meet your requirement now:

1. Download SetFolderDate 1.4.1 and unpack all files from <SetFolderDate_1.4.1 (20110718).zip> to a directory of your choice

2. Edit <SetFolderDate.ini>, section [Configuration], key "TimestampInFilenameFormat":

Code: Select all

TimestampInFilenameFormat=.+ $h+ - .+ $n+\..+
3. Select the files to be changed in TotalCommander and start <SetFolderDate_1.4.1.exe>

4. Check radio button "to that from the file's name"
All files, which will match the pattern from step 2., should be listed in SetFolderDate's listview now

5. Push "Preview" button

6a. If the previewed result is the expected result, push the "Execute" button

6b. If the previewed result is not the expected result, edit the regular expression in the textbox next to the radio button "to that from the file's name".
In order to refresh the filelist in the listview (filenames must be tested again for the modified pattern), you should click on the radio button "to that from the file's name" once more.
Grüße, van Dusen (#24722)
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Hello van Dusen

yesterday we discussed in office the date problem, today I found your fine program - thanks a lot! :D :D

Two questions:
- How to define "Ignore all BAK-Files"? *.bak does not work.
- is it possible to store the windows position and size aand the first recursive-option in INI-file?

Regards

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

van Dusen wrote:...

3. Select the files to be changed in TotalCommander and start <SetFolderDate_1.4.1.exe>

....
To be more precise:
Start the EXE from a button in the button-bar, because starting from the panel always connects to the EXE itself.


In XP Prof., display mode "Windows Classic", the small grey lines and the large bracket is not displayed.

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
van Dusen
Power Member
Power Member
Posts: 684
Joined: 2004-09-16, 19:30 UTC
Location: Sinzig (Rhein), Germany

Post by *van Dusen »

Hello Peter,

thanks for your feedback! With SetFolderDate v1.4.1 it isn't possible
  • to use DOS patterns in the ignore list,
  • to store the window position / size and
  • to have the the first recursive-option checked on startup.
All 3 features have been implemented with SetFolderDate_1.5:
  • DOS patterns in the ignore list ("*" and "?", e.g. "*.bak")
  • "Save settings" and "Save position" buttons added to the GUI.
    Window position will be stored in 4 new INI keys "GUIPosX", "GUIPosY", "GUIWidth", "GUIHeight". SetFolderDate's window will be moved / sized to these values on startup.
  • State of first recursive-option can be set in new INI key "BuildFilelistRecursively" (0|1)
    Additional:
  • Color of separator lines and the big curly bracket can be defined in new INI key "SeparatorColorRGB"
Grüße, van Dusen (#24722)
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

van Dusen wrote:...All 3 features have been implemented with SetFolderDate_1.5:
Wonderful. Thank you.
van Dusen wrote:...Additional:
[*] Color of separator lines and the big curly bracket can be defined in new INI key "SeparatorColorRGB"[/list]
Hmmmh. I set
SeparatorColorRGB=0x0000ff
which should be red (IMHO) and have blue lines ...

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
petermad
Power Member
Power Member
Posts: 16152
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Hmmmh. I set
SeparatorColorRGB=0x0000ff
which should be red (IMHO) and have blue lines ..
Try SeparatorColorRGB=0xff0000 ;-)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Post by *Peter »

Now I'm curious about it (as Dummy as I am).

I used Ultraedit 14.20 to define the colours and got these menus:
Image: http://imageshack.us/photo/my-images/13/ultraeditredhex.png
Image: http://imageshack.us/photo/my-images/841/ultraeditredhtml.png

What's the reason for this?

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3897
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

What's the reason for this?
A bug in UE ;)
#5767 Personal license
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

sqa_wizard wrote:
What's the reason for this?
A bug in UE ;)
Or an unusual peculiarity of delphi?

Regards
Holger
User avatar
white
Power Member
Power Member
Posts: 6018
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Automated Date/time change using info from filename

Post by *white »

zyx4321 wrote:However, I'm trying to find a way to change date/time using a rule taken from the name of files, and I did not found a way.

Example:
Starting with Filenames and date time
Disk 1 - Track 1.mp3 07/18/2011 17:36
Disk 1 - Track 2.mp3 07/18/2011 17:37
Disk 1 - Track 3.mp3 07/18/2011 17:39
Disk 2 - Track 1.mp3 07/18/2011 17:55
I want to change them to
Disk 1 - Track 1.mp3 07/18/2011 1:01
Disk 1 - Track 2.mp3 07/18/2011 1:02
Disk 1 - Track 3.mp3 07/18/2011 1:03
Disk 2 - Track 1.mp3 07/18/2011 2:01
Is it any way to do this in batch with Total Commander?
  • Select some files.
  • Select menu option Files/Change Attributes.
  • Enable the checkbox Change plugin attributes.
  • Click the More attributes button (if no plugin property is displayed).
  • Enter the following:

    Code: Select all

    Plugin     propery       value
    tc         writetime     [=tc.name:6]:[=tc.name:16]
    Or if there are sometimes more than 9 tracks per disk:

    Code: Select all

    Plugin     propery       value
    tc         writetime     [=tc.name:6]:[=tc.name:16-17]
  • Click the OK button.
User avatar
nn1k3
Member
Member
Posts: 141
Joined: 2007-02-06, 16:59 UTC

deleted

Post by *nn1k3 »

deleted
Last edited by nn1k3 on 2012-06-10, 14:39 UTC, edited 3 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7026
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Beginner question about SetFolderDate

Post by *Horst.Epp »

nn1k3 wrote:I can get SetFolderDate to focus on my target folder by using SENDTO.

That is good, but I would like to understand Van Dusen's instructions above:
"Select the files to be changed in TotalCommander and start <SetFolderDate_1.4.1.exe>

I try that but the program looks at its own folder.

Detail: my target files are in left panel. Setfolderdate.exe is in the right panel.
I select my files on the left. I then Tab to the right and run setfolderdate.exe.
But it still wants to work on its own folder.
As Peter told you
Start the EXE from a button in the button-bar, because starting from the panel always connects to the EXE itself.
User avatar
nn1k3
Member
Member
Posts: 141
Joined: 2007-02-06, 16:59 UTC

Post by *nn1k3 »

Thanks! (I had not used the button bar so the clear instructions above did not sink in - thanks for your patience)
Post Reply