Save list of files alfter Alt-F7 (AltF7) search

Here you can propose new features, make suggestions etc.

Moderators: sheep, Hacker, Stefan2, white

User avatar
Hacker
Moderator
Moderator
Posts: 11728
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *Hacker »

noychoH,
Can also be easily done using AutoHotkey (a 3rd party scripting language).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

User avatar
petermad
Power Member
Power Member
Posts: 9660
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *petermad »

2noychoH
Sorry - it has to be a fixed filename, not a dynamically generated filename - I cannot transfer the keyword to the filename, there is no way to get that info.
I could add the date to the filename though, using DOS - the format of the date would depend on the language settiing of your Windows.
Last edited by petermad on 2020-06-29, 13:52 UTC, edited 1 time in total.
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.965 (x64)
TC 3.0 on Android 6.0
Get:
Extended Total Commander Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

@petermad

Yes, that's what I was afraid of. But if you could add the system date with the hour, then at least the files would not overwrite each other if they are still there. And I could change my habits, adding the %keyword string in the end of the name rather than in the middle (this could be done in a much easier way), if I need to save the file for later use. The date format you are talking about is perfect for me.

So let's make it: save to the file: f:\pobrane\search-%date&hour.txt
Thank you.
Best,
noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

@Hacker and @All
Thanks for your suggestion. In my free time (i.e. when I finish correcting the student's exam works, many more this year than usual, due to online teaching), I will have a look into it. As well as into all the other suggestions made by the others. I was thinking until recently that I know TC very well, but I suppose my education halted at the level of WC 4.03, when was it? Some 30 years ago, I guess. ;-)

greetings,

noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
petermad
Power Member
Power Member
Posts: 9660
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *petermad »

2noychoH
So let's make it: save to the file: f:\pobrane\search-%date&hour.txt
Then I need to know the format of the output of the two DOS commands DATE and TIME in your locale - so please open a command promt window and run first the command DATE and then the command TIME and report here what the output is for each one...
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.965 (x64)
TC 3.0 on Android 6.0
Get:
Extended Total Commander Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

Here you are, the output of the two commands:

The current date is: 28.06.2020
Enter the new date: (dd-mm-yy)

The current time is: 16:44:51,02
Enter the new time:
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

Of course if the date could be in the ISO format (yyyy-mm-dd) it would be easier for sorting, as my approach to sorting and storing the files has to change), but that is not so important.
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

I ind it funny that you, as a convinced TC user, write:
please open a command promt window
. ;-)

I almost never do such thing, I just write DOS commands directly in the TC command line, filtered through |pause or |more, or I redirect the output to a file if needed (like in this case).

Regards,

noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
petermad
Power Member
Power Member
Posts: 9660
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *petermad »

2noychoH
OK here it comes - first you have to make two user-defined commands in your usercmd.ini file - it should be located the same place as your totalcmd.ini file. If you don't have it, just make it in notepad (you can also create and edit it with the command cm_CommandBrowser).

Put these two entries in usercmd.ini:

Code: Select all

[em_savedetails]
cmd=SAVEDETAILS "f:\pobrane\SAVEDDETAILS.txt"
menu=Save file info in the file f:\pobrane\SAVEDDETAILS.txt

Code: Select all

[em_rename_savedetails]
cmd=%COMSPEC% /C if "%time:~0,1%" geq "0" (ren "f:\pobrane\SAVEDDETAILS.txt" "Search-%date:~6,4%-%date:~3,2%-%date:~0,2%&%time:~0,2%.%time:~3,2%.%time:~6,2%.txt") else ren "f:\pobrane\SAVEDDETAILS.txt" "Search-%date:~6,4%-%date:~3,2%-%date:~0,2%&0%time:~1,1%.%time:~3,2%.%time:~6,2%.txt"
iconic=1
menu=Rename the file with date and time
And then put this button in your buttonbar:

Code: Select all

TOTALCMD#BAR#DATA
cm_SelectAllFiles, em_savedetails, cm_ClearAll, cm_GoToParent, cm_Wait 500, em_rename_savedetails

wcmicons.dll,46
Save file info for all shown files in listbox to a text file


-1
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".

The em_rename_savedetails command is a bit long, because it takes into consideration that DOS' TIME command does not use a leading 0 in hours less than 10 (at least not on my system, here it put an space in front of hours less than 10), but I think leading 0 is better for sorting purposes.

I have used periods between hours, minutes and seconds - because : (colon) is not allowed in a filename. But you can of course use another separator.
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.965 (x64)
TC 3.0 on Android 6.0
Get:
Extended Total Commander Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
petermad
Power Member
Power Member
Posts: 9660
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *petermad »

Alternative em_rename_savedetails with % before the date and - between hours-minutes-seconds.

Code: Select all

[em_rename_savedetails]
cmd=%COMSPEC% /C if "%time:~0,1%" geq "0" (ren "f:\pobrane\SAVEDDETAILS.txt" "Search-%%date:~6,4%-%date:~3,2%-%date:~0,2%&%time:~0,2%-%time:~3,2%-%time:~6,2%.txt") else ren "f:\pobrane\SAVEDDETAILS.txt" "Search-%%date:~6,4%-%date:~3,2%-%date:~0,2%&0%time:~1,1%-%time:~3,2%-%time:~6,2%.txt"
iconic=1
menu=Rename the file with date and time
.
License #524
Danish Total Commander Translator
TC 9.51 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.965 (x64)
TC 3.0 on Android 6.0
Get:
Extended Total Commander Menus | TC Languagebar | TC Dark Help | PHSM-Calendar

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

@PETERMAD
Thank you so much. When you have done it and I am looking at it, it seems soooo easy. But to do it myself would be pain in ass. Thank you again. You're very helpful. I will implement it immediately!

Greetings

noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

Of course this help of yours is a temporary solution, so I hope (not for myself any longer, but for others) that my proposal of creating the additional button in the Find Files window, would be taken up seriously by those who would work on some future version of TC. Many operations that could be done in such a way as presented here, have found their way into the interface of TC. I think this one is worth being takenb into consideration, too.
Greetings to all,
noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

User avatar
Usher
Power Member
Power Member
Posts: 856
Joined: 2011-03-11, 10:11 UTC

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *Usher »

noychoH wrote:
2020-06-28, 15:47 UTC
I just write DOS commands directly in the TC command line, filtered through |pause or |more
What for? Let TC work. Just type any command you need and press Shift+Enter.
Regards from Poland
Andrzej P. Wozniak

User avatar
noychoH
Junior Member
Junior Member
Posts: 19
Joined: 2020-06-26, 07:14 UTC
Location: Lublin (Poland)

Re: Save list of files alfter Alt-F7 (AltF7) search

Post by *noychoH »

Thanks, Usher, for your advice. To answer your (rhetoric, I suppose, but anyhow) question, it's only that I am used to DOS commands since 1980-ies, so if I know how to solve the issue, I am not looking for anything else.
noychoH
世界上只有一种失败﹐它叫做半途而废。
........Shìjiè shàng zhǐ yǒu yī zhǒng shībài, tā jiào zuò bàntúérfèi.
En la mondo estas nur unu speco de malsukceso: halti mezvoje...

Post Reply