one command vs two panels
Moderators: Hacker, petermad, Stefan2, white
one command vs two panels
I have registered Control-V custom hotkey and it does "cm_CRCcheck" - it takes selected checksum files from the current panel and verifies CRC chesksums.
It often happens that I have opened two panels with different directories and both contain some selected checksum files to check.
If I want to verify these selected CRC checksums in both panels then I need these steps:
- press Control-V (1st CRC checking window appears)
- click on main TC windows focus it again
- press TAB to select the other panel
- press Control-V again (2nd CRC checking window appears)
Questions:
1) Is there any way for TC to check selected checksum files from both panels in just one window?
2) If (1) is not possible then maybe there is some way to do all these steps I mentioned above with just one hotkey?
3) If (2) is not possible then maybe there is some way to run some TC command for files from both panels?
It often happens that I have opened two panels with different directories and both contain some selected checksum files to check.
If I want to verify these selected CRC checksums in both panels then I need these steps:
- press Control-V (1st CRC checking window appears)
- click on main TC windows focus it again
- press TAB to select the other panel
- press Control-V again (2nd CRC checking window appears)
Questions:
1) Is there any way for TC to check selected checksum files from both panels in just one window?
2) If (1) is not possible then maybe there is some way to do all these steps I mentioned above with just one hotkey?
3) If (2) is not possible then maybe there is some way to run some TC command for files from both panels?
Re: one command vs two panels
Try this as Command in a Button:
cm_CRCcheck,CM_WAIT 2000,cm_FocusTrg,cm_CRCcheck
- select both files
- click on the button
Did that help?
cm_CRCcheck,CM_WAIT 2000,cm_FocusTrg,cm_CRCcheck
- select both files
- click on the button
Did that help?
Re: one command vs two panels
I use Configuration -> Options -> Misc -> Command and here I can't enter this string of commands.
Only one command is possible to enter.
Re: one command vs two panels
2Lexor
Run the commmand cm_CommandBrowser
In the left list go down to usercmd.ini and click on it
Make a new command - call it for example em_doubleCRCcheck
Enter the command suggested by Stefan2 and save the em_doubleCRCcheck
Now you can use the em_doubleCRCcheck command in Configuration -> Options -> Misc
Run the commmand cm_CommandBrowser
In the left list go down to usercmd.ini and click on it
Make a new command - call it for example em_doubleCRCcheck
Enter the command suggested by Stefan2 and save the em_doubleCRCcheck
Now you can use the em_doubleCRCcheck command in Configuration -> Options -> Misc
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: one command vs two panels
Thank you, your method works.petermad wrote: 2024-07-01, 23:21 UTCNow you can use the em_doubleCRCcheck command in Configuration -> Options -> Misc

It's interesting that it was needed to create macro with macros.

So I suppose there is no current way to run such double panel CRC check with the use of only one CRC window just like one CRC window is used when all checksum files are only in one panel?
I also have one additional question. The current CRC window looks like this:
Code: Select all
checksum.md5:
OK: file.ext
Errors: 0
OK: 1, not found: 0, read error: 0, wrong checksum: 0
Code: Select all
C:\directory\checksum.md5:
OK: file.ext
Errors: 0
OK: 1, not found: 0, read error: 0, wrong checksum: 0
Re: one command vs two panels
2Lexor
You can make a search for *.md5 files in a way so it includes both file panels. Then you can Feed the search result to listbox, select the found .md5 files and run cm_CRCcheck - in that case the full path of the md5 files are shown in the CRC window.
You can use this command in your usercmd.ini file to search in both the source and target panel:
You can make a search for *.md5 files in a way so it includes both file panels. Then you can Feed the search result to listbox, select the found .md5 files and run cm_CRCcheck - in that case the full path of the md5 files are shown in the CRC window.
You can use this command in your usercmd.ini file to search in both the source and target panel:
Code: Select all
[em_SearchInSourceAndTarget]
cmd=%COMMANDER_EXE% /S=F
param=""%P";"%T""
button=wcmicons.dll,47
menu=Search for files in both source and target panel
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: one command vs two panels
I've used the code and it works, so I am one step closer to the ultimate solution to my problem.petermad wrote: 2024-07-02, 10:16 UTCYou can make a search for *.md5 files in a way so it includes both file panels.

Now, is there a way to "autocomplete", "autofeed" that search form to listbox, "select all", "check CRC", "quit listbox" to let me search for my md5s in both panels and CRC check them with just one hotkey?
Re: one command vs two panels
Not if the two directories you start in are not always the same. If they are the same it is possible to fully automate it.is there a way to "autocomplete", "autofeed" that search form to listbox, "select all", "check CRC", "quit listbox"
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: one command vs two panels
Well, the directories with md5 files are not always the same.petermad wrote: 2024-07-02, 12:58 UTCNot if the two directories you start in are not always the same. If they are the same it is possible to fully automate it.

What would be the solution if they are? Maybe I'll find some way to implement this somehow.
Re: one command vs two panels
2Lexor
Well, I cannot make it fully automatic anyway - so here is what you can do:
First you have to make a saved search.
You might have to use a higher number for the cm_Wait command.
You can now use the em_CrcChk in a keyboard shortcut or in a button in the button bar.
You will have to manually close both the "Search result:" panel (press Backspace) and the "Find Files (Separate)" dialog (might be hiding behind TC's main window) after the CRC Check is done.
______________________
If the directories and .md5 files were the same each time you could do this:
Put these commands in your usercmd.ini file:
Well, I cannot make it fully automatic anyway - so here is what you can do:
First you have to make a saved search.
- Open the Find Files dialog (Alt+F7).
- In the "Search for:" field enter: *.md5
If you want more checksum formats you can add them here too - for example: *.md5 *.sha1 *.sfv - Clear the field "Search in:" - this is important.
- If you want to find the checksum files in the Current dir only or for example only 1 level deep, you can set it in the "Search in subdirectories:" dropdown box.
- Click on the Tab "Load/Save"
- Click on the button "Save"
- Enter the Template name: CrcCheck.
- Close the Find Files dialog.
Code: Select all
[em_CrcChk0]
cmd=%COMMANDER_EXE% /S=F:L==CrcCheck
param=""%P";"%T""
[em_CrcChk]
cmd=em_CrcChk0,cm_Wait 500,cm_SelectAll,cm_CRCcheck
button=wcmicons.dll,61
menu=Run CRC-check with md5 files in source and target dir (and their subdirs)
You can now use the em_CrcChk in a keyboard shortcut or in a button in the button bar.
You will have to manually close both the "Search result:" panel (press Backspace) and the "Find Files (Separate)" dialog (might be hiding behind TC's main window) after the CRC Check is done.
______________________
If the directories and .md5 files were the same each time you could do this:
Put these commands in your usercmd.ini file:
Code: Select all
[em_savelist0]
cmd=SAVESELECTION "%COMMANDER_INI_PATH%\crccheck.txt"
[em_savelist]
cmd=cm_SelectAll,em_savelist0,cm_ClearAll
menu=Save search in the file crccheck.txt
button=wcmicons.dll,47
[em_loadlist]
cmd=LOADLIST "%COMMANDER_INI_PATH%\crccheck.txt"
menu=Load search from the file crccheck.txt
button=wcmicons.dll,47
[em_CrcCheck]
cmd=em_Loadlist,cm_Wait 500,cm_SelectAll,cm_CRCcheck
menu=Run CRC-check with md5 files from saved list crccheck.txt
button=wcmicons.dll,61
- Make the search for the .md5 in both panels and feed the result to listbox.
- Run the command em_savelist
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: one command vs two panels
You may want to put in ">" instead. That works too, and that way if you use the saved search in another way (not via Total Commander's command line parameters), then the "Search in" field will retain its value instead of being cleared.
Re: one command vs two panels
Thank you for sharing your method, petermad.
Do you know where that template is saved? To some file? To the registry? Can it be somehow modified manually, outside of TC?
Re: one command vs two panels
Almost all settings are stored in the ini file, see the About screen (menu option Help/About).
Depending on what you are trying to do, you might be better of changing the loadlist, which is just a regular txt file.
Re: one command vs two panels
It is saved to your wincmd.ini file in the section [Searches] as:Do you know where that template is saved?
Code: Select all
CrcCheck_SearchFor=*.md5
CrcCheck_SearchIn=>
CrcCheck_SearchText=
CrcCheck_SearchFlags=0|002002010021|||||||||0000|0||
I recommend, that if you want to change the saved search, that you in the Find Files dialog, click the Load/Save tab and Load the saved search, alter what you need, and save it again with the same name. Especially the CrcCheck_SearchFlags setting is not for manual editing
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: one command vs two panels
Is there any way to "improve" that search by auto-filling "Search for:" field with "md5" string?petermad wrote: 2024-07-02, 10:16 UTCYou can use this command in your usercmd.ini file to search in both the source and target panel:
Code: Select all
[em_SearchInSourceAndTarget] cmd=%COMMANDER_EXE% /S=F param=""%P";"%T"" button=wcmicons.dll,47 menu=Search for files in both source and target panel