How to make the number of levels in Find Files persistent
Moderators: Hacker, petermad, Stefan2, white
How to make the number of levels in Find Files persistent
Try as I may I cannot figure out how to make Find Files - Search in subdirectories - Number of levels option persistent throughout a TC session.
Many thanks.
Many thanks.
Re: How to make the number of levels in Find Files persistent
Make your settings and the use Load/Save tab to store them under a name.
Later you can load this saved setting
or make a button with the LOADSEARCH command to load it
LOADSEARCH your_saved_search
Later you can load this saved setting
or make a button with the LOADSEARCH command to load it
LOADSEARCH your_saved_search
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: How to make the number of levels in Find Files persistent
Thanx a lot for your immediate reply.
When I switch panes, Alt+F7 opens with All (Unlimited depth) again.
Is that intentional ?
If yes, then the Save/Load feature is useless for me as I need to search a limited number of levels throughout the entire day.
What am I doing wrong?
When I switch panes, Alt+F7 opens with All (Unlimited depth) again.
Is that intentional ?
If yes, then the Save/Load feature is useless for me as I need to search a limited number of levels throughout the entire day.
What am I doing wrong?
Re: How to make the number of levels in Find Files persistent
Do an additionally step.
Create a user defined command from the above, next you can map Alt+F7 to execute that UDC
usercmd.ini:
[em_MySearchSettings]
CMD=LOADSEARCH search_MySavedSearchSetting
Now assign a keyboard shortcut at Misc. to your new command: em_MySearchSettings
You can use the original shortcut to open the search or another key combination you want.
For more see >>> https://ghisler.ch/board/viewtopic.php?p=390483#p390483
Re: How to make the number of levels in Find Files persistent
Interesting. Thx.
With that approach, I think I would need to maintain several commands for each number of levels required.
I do not mind making one-time settings when launching TC in the morning. What I do mind though is having to spill tons of user commands all over the floor.
Am I the only one in this universe who would be perfectly happy with a simple mode in which Find files settings /i.e. the number of levels and Find text options, in particular/ would be persistent until next user change?
There is no doubt the concept you presented is extremely powerful for numerous types of jobs, yet I am convinced that persistency during a TC session might be beneficial/convenient for some.
I would like your opinion.
With that approach, I think I would need to maintain several commands for each number of levels required.
I do not mind making one-time settings when launching TC in the morning. What I do mind though is having to spill tons of user commands all over the floor.
Am I the only one in this universe who would be perfectly happy with a simple mode in which Find files settings /i.e. the number of levels and Find text options, in particular/ would be persistent until next user change?
There is no doubt the concept you presented is extremely powerful for numerous types of jobs, yet I am convinced that persistency during a TC session might be beneficial/convenient for some.
I would like your opinion.
Re: How to make the number of levels in Find Files persistent
Probably not, but TC is all in for safety (TC is used in many companies), and all to easy one could forget that a special setting was made in the morning
which is not remembered at afternoon and so the search result is not the real thing and can led to unfortunate mistakes.
If you going to make this persistent settings on your own by the above shown steps, that is your own issue, but nothing one could blame TC for.
Example?
08:00 I search at top level only for a project description > "2 level" ++ set "[x]use as default" as it is totally clear I will need that for the whole day.
15:00 I get a call to urgently cleanup the share now! and so have to check folders if save to delete them
and so I search at all sub folders (what I think I do) for any left over "todo" file, but forget the set persistent check mark. Boom.
Re: How to make the number of levels in Find Files persistent
mmm,
If you don't mind using AutoHotkey, here is a short script that upon pressing Alt-F7 waits for the Find Files window and sets the depth to whatever is written in the file Depth.txt, so, you just write the number like "3" without quotes into Depth.txt and have the script running.
HTH
Roman
If you don't mind using AutoHotkey, here is a short script that upon pressing Alt-F7 waits for the Find Files window and sets the depth to whatever is written in the file Depth.txt, so, you just write the number like "3" without quotes into Depth.txt and have the script running.
Code: Select all
~!F7::
FileRead, Depth, Depth.txt
WinWaitActive, ahk_class TFindFile
Control, ChooseString, %Depth%%A_Space%, LCLComboBox1
Control, ChooseString, %Depth%%A_Space%, TMyComboBox1
Return
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.
Re: How to make the number of levels in Find Files persistent
To Stephan2:
I see your point. With all due respect I disagree.
If your folks turn off spell-checker in the morning when writing a private letter about their company to their friend, then they are bound to send a business letter full of F-words to their boss in the afternoon and nobody can do anything about it.
No biggie though. I may submit an enhancement request in the future; need to talk to my team mates first.
To Roman:
Impressive implementation I must say. However, I wouldn't want to fiddle with an external TXT file at work as I have to make hundreds of searches per day. Put another, I consider your script a workaround, not a solution. Will use the code in a different situation though. Thanks for sharing.
I see your point. With all due respect I disagree.
If your folks turn off spell-checker in the morning when writing a private letter about their company to their friend, then they are bound to send a business letter full of F-words to their boss in the afternoon and nobody can do anything about it.
No biggie though. I may submit an enhancement request in the future; need to talk to my team mates first.
To Roman:
Impressive implementation I must say. However, I wouldn't want to fiddle with an external TXT file at work as I have to make hundreds of searches per day. Put another, I consider your script a workaround, not a solution. Will use the code in a different situation though. Thanks for sharing.
Re: How to make the number of levels in Find Files persistent
mmm,
As I understood it, you only want to set the depth once per day, so you only need to edit the file once in the morning. I thought this would suit you. If it does not, I can easily modify the script so that when the Find Files window appears, the first number you press, e.g. "7", sets the search depth to that number. Not sure if this would help in any way, though, as it would require you to always press that number. Or there could be a timeout, such as if you don't press a number within two seconds, the previous search depth will be used.
Roman
As I understood it, you only want to set the depth once per day, so you only need to edit the file once in the morning. I thought this would suit you. If it does not, I can easily modify the script so that when the Find Files window appears, the first number you press, e.g. "7", sets the search depth to that number. Not sure if this would help in any way, though, as it would require you to always press that number. Or there could be a timeout, such as if you don't press a number within two seconds, the previous search depth will be used.
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.
Re: How to make the number of levels in Find Files persistent
mmm,
Here is a script that takes the last used value from Depth.txt, but you have one second to change it to something else and make it the new default value. Works only with values up to 9, though.
Roman
Here is a script that takes the last used value from Depth.txt, but you have one second to change it to something else and make it the new default value. Works only with values up to 9, though.
Code: Select all
SetWorkingDir, %A_ScriptDir%
#IFWinActive, ahk_class TTOTAL_CMD
~!F7::
WinWaitActive, ahk_class TFindFile
Sleep, 100
If FileExist("Depth.txt")
{
FileRead, PreviousDepth, Depth.txt
Control, ChooseString, %PreviousDepth%%A_Space%, LCLComboBox1
Control, ChooseString, %PreviousDepth%%A_Space%, TMyComboBox1
}
Input, Depth, L1 T1, {Esc}, 1,2,3,4,5,6,7,8,9
If (ErrorLevel = "Match" && Depth != PreviousDepth)
{
Control, ChooseString, %Depth%%A_Space%, LCLComboBox1
Control, ChooseString, %Depth%%A_Space%, TMyComboBox1
FileDelete, Depth.txt
FileAppend, %Depth%, Depth.txt
}
Return
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.
Re: How to make the number of levels in Find Files persistent
Nope. I need to toy with the depth now and then during the work day.you only want to set the depth once per day,
However I find your scripting skills absolutely astonishing, I am not leaning towards this approach. Thinking about a clean solution in GUI available for all TC users - if they are interested.Here is a script that takes ...
I found out that most options in Find files ARE persistent; not only throughout a TC session but they remain persistent even after TC exit. /Search archives, Find text panel/. I have to admit I did not know that until now.TC is all in for safety (TC is used in many companies), and all to easy one could forget that a special setting was made in the morning
I think I understand reasons why the search depth option /aka levels/ was left out. When set hastily by a fresh user, it may lead to outstanding issues with search results. Please allow some time to think about a safe and robust implementation of the persistency in question.
On a side note - now that I know most Find files options are persistent, how can I go back to default settings upon a single click?
Many thanks to Bratislava,
mmm
Re: How to make the number of levels in Find Files persistent
One solution is to use an Everything search in which you can control the depth.
The result can be feed to a file list in TC using our AHK script "Open Everything GUI results with TC LOADLIST".
viewtopic.php?t=75439&hilit=everything+file+list
Also you can make an Everything search from TC search with the ev: or ed: prefixes
and the additional Everything parameters for setting the depth,
The result can be feed to a file list in TC using our AHK script "Open Everything GUI results with TC LOADLIST".
viewtopic.php?t=75439&hilit=everything+file+list
Also you can make an Everything search from TC search with the ev: or ed: prefixes
and the additional Everything parameters for setting the depth,
Last edited by Horst.Epp on 2022-06-23, 13:55 UTC, edited 2 times in total.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
Re: How to make the number of levels in Find Files persistent
mmm,
Roman
While I understand this approach, keep in mind that the workaround I (and e.g. Horst.Epp) offer is available now. An implementation, if at all, won't come for some time.However I find your scripting skills absolutely astonishing, I am not leaning towards this approach. Thinking about a clean solution in GUI available for all TC users - if they are interested.
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.
Re: How to make the number of levels in Find Files persistent
2mmm
What about using Alt+Shift+F7 and Find files in a separate process? You can keep that window open throughout a TC session and feed search results to main TC window if needed.
What about using Alt+Shift+F7 and Find files in a separate process? You can keep that window open throughout a TC session and feed search results to main TC window if needed.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: How to make the number of levels in Find Files persistent
A crash of thunder in dead calm. Nice!
How do you synchronize the search path in the Find files dialog when switching between the panes in the Main window or walking up and down the tree in the Main window?
Also, could please drop a line or two about "feeding search results to the main window" ?
I swear I would not ask if I could find a decent TC manual. Is there any?
How do you synchronize the search path in the Find files dialog when switching between the panes in the Main window or walking up and down the tree in the Main window?
Also, could please drop a line or two about "feeding search results to the main window" ?
I swear I would not ask if I could find a decent TC manual. Is there any?