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

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

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

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

Post by *noychoH »

One of the functions used most often by me is the very powerful Alt-F7 (AltF7) search for files with different criteria preset. Much more powerful than the DOS dir command in several aspect, except one. It is so useful to e.g. search for all files that contain "4" somewhere in the name or extension, created between the 21st of July 2012 and the 13th of January 2014, not larger than 156 kB, which contain a text string "expedient". I was always wondering, why it isn't possible to save the obtained result as a file (like you can redirect the output of the DOS dir command into a file, e.g. dir can*.* /s /o:ne > e:\can-list.txt) if it is possible to feed it to listbox. Especially that it is possible to save (and load) the search pattern (which is like saving a command line), which I find useful (you do not need to set all the parameters again) but less useful than my proposal (you have to rerun the search, even if nothing has changed in the structure of the disk, which is annoying). The list from the listbox unfortunately easily disappears after some operations (e.g. when you want to narrow down the search result - another powerful and wonderful function), so you need to rerun the search (e.g. to narrow down by another criterion). "Save the list as..." button could really help in hundreds of situations. Now I am making screenshots, screen by screen, and sometimes I print them, and imagine what it is if the search has found more than a thousand files with the given criteria (which is not so rare in my case, as I use it often to search for files created, say, ca. 12 years ago, in huge external backup disks).
I do not know if someone didn't make such a proposal before, but quick search has not revealed anything similar to it. (Searching the Forum for "Alt-F7" reveals only 9602 messages containing all appearance of the "alt" string only, among them probably "Alt-F7" as well, but within the first 4 screens not a single one appeared, I gave up); changing it into "Alt F7" or "Alt +F7" seemingly doesn't change anything; the "F7" string is considered too short for the search to begin; and searching for "AltF7" and "altf7" revealed only 6 messages, not relevant).
世界上只有一种失败﹐它叫做半途而废。
........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
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

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

Post by *Dalai »

Search results can be used just like any other file listing after they're fed to the list box via the button in the lower right corner of the search dialog. After that, select all files and then use menu Mark > Save Selection to File.

In case you need more details (i.e. size, date and so on), use Mark > Copy To Clipboard With All Details and paste it into a file of your choice.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
nsp
Power Member
Power Member
Posts: 1805
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

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

Post by *nsp »

If you only search for files in regular folder the easiest is to use first feed to listbox and then you have some way to save from the filled. You have to select All
  1. Using clipboard and the saving
    1. cm_CopyFullNamesToClip
    2. cm_CopyFileDetailsToClip
  2. Using generated filelist %L %UL %WL
    1. use a button or a command to save %WL to a file. You can use askparam and a dos comand to copy the temporaty file to your selected result file
  3. Using virtual Folder
    1. put virtual panel in the target side and verify you have a persistent list.
    2. create a temporary folder
    3. copy files
    4. use vp command to retreive file list or same %WL method
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 »

Thank you for your answers. I will try.
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 »

@Dalai - @nsp - Thank you once again for your answers.

@Dalai - I have never used the Mark menu, since NC and WC, you know. In the beginning I probably didn't find it useful (using menu items when you can use keyboard keys like *, /, -, + etc. always seemed to me awkward), so I have completely ignored it for years. I don't know, if such options were there in the old times, or when did they appear, and you have now rediscovered it for me. Tgether with the information I got from you in the other thread (on Button Bar), I was able to temporarily solve my issue. Great thanks!

@nsp - I do not understand your B, how to use a "generated file list" etc. If I understand well your C, a virtual panel is an add-in to TC, which I haven't installed, so I couldn't check. Anyhow, I guess (maybe I am wrong), this will result in the same if I created a temporary folder on the target drive and try to copy all the files there. Disaster! Most of those file have the same names , month to month, so they will either be overwritten with the next ones, or the next ones will be skipped, or I should change their names each time. I do not need to copy them, I need to have a list of them with all parameters and paths.
So finally your A has almost solved my problems, together with the information I got from @Dalai here and in another thread, I have realised that what I need is yet another command:
iii. cm_CopyFpFileDetailsToClip
or
iv. cm_CopyNetFileDetailsToClip
I do not know, what is the difference between the two, because all my tries have given exactly the same output information form both commands.
So I have added the (iii) comand as a button to my Button Bar, and I am half happy. Great thanks!

I am however temporarily rielieved only and half-happy, and why - a followup in the next message will clarify.

Regards,
Last edited by noychoH on 2020-06-26, 15:21 UTC, edited 3 times in total.
世界上只有一种失败﹐它叫做半途而废。
........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 »

These methods are correct, thanks again, yet having received from you something, I still want something more. They do not answer my original intention and suggestion, on adding a button to the Alt-F7 screen, "Save it to a file" aside to "Feed it to listbox". Why?

Because:
A. Using the option of @Dalai requires 7 steps (I unerstand - after having finished the search with Alt-F7)
1) Press the button: Feed to listbox
2) Choose menu: Mark
3) Click manu item: Select All
ad 2) and 3) NB. You may also use a quicker, keyboard only 2-step method: [Grey+ (NumPad+) => Enter]; or even be able to select all using a 1-step method: Ctrl-A or Grey-* [= NumPad-*].
4) Choose menu: Mark
5) Click the appropriate menu item (first ponder upon to decide which one to click, as their names are quite similar to one another): Copy to Clipboard with Path and Details [or another one(*)].
(*) - See in the end.
6) Open Notepad in a simple way (as it is already on the Button Bar, if you have not removed it from there) or open another software (like Libre Office, if you have it in the Quick Task Bar of Windows in the bottom of your screen (Sorry, I don't know if I call it correctly, because I am not used to English terminology, only to the Polish one, but I hope you understand me) - and if no such software is handy available there, you need not one step, but more of them.
7) Paste the text (again quick method is a keyboard method: Ctrl-V, slower one is using your mouse: [Right-click => Paste], with two steps.(**)
(**) I am not even thinking abouth those who use their TouchPad, instead of a mouse, how much slower they are.
ad 5), 6) and 7) NB. Theoretically you might say that these 3 steps could be avoided (be reduced to one) if you choose the menu item "Save Selection to File", like @Dalai has written first, but then your output is only the file names with their paths, no other information (like date and size) - this is mostly useless to me.(*)
(*) See in the end, again.
8 ) Save the file (i.e. give it a name, maybe change a path, and click Save or press Enter). [You may argue, that these are again two steps in fact, I will not counterargue, but let us call them 8a) and 8b), because both are indispensable, one cannot work without the other].
Even if you reduce steps 2) and 3) to a single one, you still have at least 7 steps.

B. Using the options I have created now for myself, thanks to the information provided by both @Dalai and @nsp (under A), i.e. after having created a button in my Button Bar, which combines steps 4) and 5) in a very effective and quick way, I can reduce these 7 steps to 6. But there are still 6 of them

For an unexperienced user both option A. and B. might seem complicated or at least not intuitive. (Even for one like me, with a 30-years experience in using NC, WC and TC, as today's exchange shows, they were not intuitive. I.e. I always used to try copying the marked files useing Ctrl-C or [Mouse Right-click => copy], with no success). And many unexperience users might be unable to edit their Button Bar at all.

C. I am unable to analyse the options B and C of @nsp, as written before, but they also seem to contain more steps than my proposal, because (if I understand them well), same as option A. and B., they require at least 3 superfluous steps: of copying from the Alt-F7 results window to some listbox, then copying from that listbox to a clipboard, then copying from the clipboard to a file. All done manually.

The main issue is: why should I feed the search results to the listbox, if I need them in a file?

D. My proposal (suggestion) is to replace these 8, 7 or 6 steps with 2 steps only:
1') Press the button: Save to a file (instead of: Feed to listbox)
8') Save the file (i.e. give it a name, maybe change a path, and save)

And If I could save those results as a file immediately, I could still have them / keep them in the original form, in the Alt-F7 window, which I could subsequently feed wholly to a list box, or view from it a single file, or just watch for a while and then close the window.

This is the main idea of NC, WC and TC - to make the repetitive tasks simpler, and quicker.

(*) You might argue, that a) different people might need different information in the output file, so b) one button might not be enough. Maybe a) Yes, but still b) No. Of course there might be those who would choose name only, without the path, or names and paths without the date and/or size, although I cannot imagine what purpose could it serve (my imagination is however unimportant). Yet I think the default information copied-and-pasted with such a button should be: [Full name with the path + file date + file size]. This is smiply the most useful option. For example the file attribute seems to me not so much important, but that's aonly for me, again. So I think the default content of this copy and paste information for a given user could be preset in the general configuration, for each user. And even, if needed for some specific prupose once and then, there might be some boxes to tick or untick aside to this button (although this might be cumbersome, not necessarily recommeded), or another tab at the top of the Search-result window.

This is my proposal. Unfortunately I am unable to participate in any design of software, even if I wanted to, my knowledge of programming is quite limitted and practically restricted to several long outdated issues.

Best greetings for all,
noychoH
Last edited by noychoH on 2020-06-26, 15:19 UTC, edited 3 times in total.
世界上只有一种失败﹐它叫做半途而废。
........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 am sorry, number 8 with a brace 8 ) has been changed twice into some emoji (smiley), "cool" 8), without my will. I have edited these.

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: 1675
Joined: 2011-03-11, 10:11 UTC

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

Post by *Usher »

2noychoH
Only two remarks.
1. Total Commander and other orthodox file managers are keyboard oriented. You can use them without mouse at all. Jumping from keyboard to mouse and back to keyboard is counterproductive, especially when most of your actions lead to typing selections, filenames etc.
2. You can do many things much easier if you use extensions or plugins. In this case you can use diskdirW packer extension (W stands for Unicode version - as you need to keep Polish ogonki and possibly other non-ASCII characters) to save your search results. After installing this extension things may go really easy:
- feed search results to listbox;
- use Ctrl+A to select them all;
- press Alt+F5, select packer with lst extension, type needed filename and press Enter to save the list.
Saved lists may be browsed like other archives and used in other searches with Alt+F7, if you mark "Search archives" when providing general search options.

You can find and read older topics about diskdirw if you need more info:
https://www.ghisler.ch/board/search.php?keywords=diskdirw&terms=all&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=-1&t=0&submit=Search
Andrzej P. Wozniak
Polish subforum moderator
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

2noychoH
This button:

Code: Select all

TOTALCMD#BAR#DATA
cm_SelectAllFiles, cm_SaveDetailsToFile, cm_ClearAll

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


-1
Should do what you want in one step AFTER you have fed to listbox (I cannot avoid feeding to lisbox).
To make the button:
1. Mark the green text above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctri+C).
3. Right click on TC's buttonbar and choose "Paste".


If you want directories included in the list you can use:

Code: Select all

TOTALCMD#BAR#DATA
cm_SelectAllBoth, cm_SaveDetailsToFile, cm_ClearAll

wcmicons.dll,46
Save file info for all shown files and folders to a text file.


-1

If you want the file in ANSI you can use:

Code: Select all

TOTALCMD#BAR#DATA
cm_SelectAllFiles, cm_SaveDetailsToFileA, cm_ClearAll

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


-1

You can even close the listbox and open Search again

Code: Select all

TOTALCMD#BAR#DATA
cm_SelectAllFiles, cm_SaveDetailsToFile, cm_GoToParent, cm_SearchFor

wcmicons.dll,46
Save file info for all shown files in listbox to a text file, clear listbox and open Search again:


-1
Unfortunately in this case Search does not open with it's previous result, because it has ben fed to listbox
Last edited by petermad on 2020-06-27, 08:32 UTC, edited 3 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Hacker
Moderator
Moderator
Posts: 13065
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

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

Post by *Hacker »

noychoH,
You could also press Ctrl-C in the result list without feeding to listbox. This will copy the found file names to the clipboard.

HTH
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
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 »

@Usher,
Thanks for your interest and all comments.

ad 1) I know, that TC is keyboard oriented, myself I am too, but most modern users, whom I know, even those using TC, are not - they are mouse oriented.
You're right that switching from keyboard to mouse and back might seem counterproductive. Everything depends of course on your habits and speed.
Yet sometimes it is counterproductive to stick to keyboard, e.g. when you can do the same thing in 1-2 step with a mouse, instead of 7 keyboard steps. Especially if this is an option you are using rarely, you don't remember all the shortkeys, you have to read them from the pull down menu, you need to find your glasses first, etc. etc. ...
And if my proposal of an additional button be accepted, the button (or the command behind it) could also be accessed with a keyboard, like all the others are. One step anyhow.

ad 2) Your proposal is in 5 steps instead of 6, yet it still isn't 2 steps.

Regards (from Poland, too),
noychoH (a.k.a. Maciej St. Zięba)
世界上只有一种失败﹐它叫做半途而废。
........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 »

@petermad
Thanks for your comments and a very interesting proposal to combine more functions under one button. In theory I have read about that years ago, but I never did it in practice. What more, I have learned from you, how to do it. So far I've been adding / modifying all Button Bar buttons manually (Configuration => Button Bar). If not my computer crash, I would have just copied all my TC configuration files from the previous computer to a new one, when moving from Windows 7 to 10, and from TC 7.xx to 9.xx and I would be thinking about the issue for another dozen of years, doing nothing. Now I had to rethink everything, and even my coputer skills improve with a bit of simple "programming". Thank you.

Your proposal goes much futher than those of the others commenting here before you (I haven't yet read and reflected upon the last one). Your button consumes all the commands from 2) to 7) yet it is still 3 steps, not 2 - step 1) and step 8') remain unchanged. Yet it is a very, very interesting proposal. I will modify my button acordingly. Thanks again.

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: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

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

Post by *petermad »

2noychoH
If you use the "Search in separate Process" (Shift+Alt+F7 in stead of Alt+F7) then the Search window is not closed, when you feed to listbox, but the search window is put in the background.

step 8') remain unchanged.
I can make a solution that automatically saves to a file with a fixed filename (no file "Save as" dialog).
The file can either be placed in the current diretory, in the directory of the opposite file panel, or in a fixed directory.
Just let me know what you want...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended 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 »

@Hacker
Roman, Thank you for your advice. Your proposal goes really very far, and is an interesting shortcut, and I have learned again something new, yet this is still a 4-step proposal. Your Ctrl-C replaces steps 1) to 5) (feed to listbox, mark all and copy to the clipboard), yet the remaining 3 steps are still to be done. What more, while the Find File window is still open, you cannot access the Notepad button in the Button Bar of TC, what you need is to have a Notepad button handy in the Quick Task Bar of Windows in the bottom of your screen .
What more, again, it has yet another shortcome that it shows only files' paths and names, with no other information. Maybe it is useful to someone, sometimes to me, too, but in most cases I also need the information about the file date and size.
My idea is that the new button not only copy the content of the search result to the clipboard (what your proposal does), but that it also open a text file (Notepad file) and paste the search result content to it.

Best 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 »

@petermad

Thank you for your offer. This woud really be great!
Usually I name such files
search-%keyword-%date.txt
where %keyword is the word searched for, and %date is the current date of search;
and I put them in the
f:\pobrane
which is my default folder for downloaded files; after being used they are either stored elsewhere or deleted.
Is it feasible? If so, you are my hero of the day!

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...
Post Reply