Is there a way to make a custom menu item that, with no files currently selected, will create a single CRC for all files and dirs in the current directory (including subs) to a single file (in the current dir) called _____.blake3 (in other words, the same filename regardless of the directory it's executed in)
I've unsuccessfully tried passing various versions of %P*.* and so forth, so I'm assuming this internal command won't take parameters. Correct? Is there any way to do it?
CRC all files/folders in current dir?
Moderators: Hacker, petermad, Stefan2, white
Re: CRC all files/folders in current dir?
This is not a one button solution as you cannot pass parameters to cm_CRCcreate.
But this is how you can do manually to achieve at least calculation.
Using the CRC calculation cm_CRCcreate:
You need to select all including sub-folder or only place the cursor on the root folder of your checksum creation (using BackSpace).
call cm_CRCcreate (Menu, command, ..., you can also define a hotKey)
- Select "Blake3" (alt+b)
- Tick checkbox for "Create separate checksum files for each directory" (alt+d)
- Then on the created file field, you can use a fixed name like ____.blake3 (remove any path) (shift+tab shift+tab ____.blake3)
- Then proceed. (once launched, you can continue calculation in background) (Enter .. Alt+B)
return to your initial folder unselect all or enter in folder.
Adapt to your needs if you want more calculation options.
You can probably use autohotkey or powerpro or autoit or ..... to automate it using keystroke and wait.
[-edited-]
If you want a single file for all files including the one in subfolder, do not tick "Create separate checksum files for each directory" and just edit file name keeping path and replacing folder name by the one you want. %P %T are not supported in this field ! you can guess current folder or selected folder using command to store in clipboard before calling cm_create.
But this is how you can do manually to achieve at least calculation.
Using the CRC calculation cm_CRCcreate:
You need to select all including sub-folder or only place the cursor on the root folder of your checksum creation (using BackSpace).
call cm_CRCcreate (Menu, command, ..., you can also define a hotKey)
- Select "Blake3" (alt+b)
- Tick checkbox for "Create separate checksum files for each directory" (alt+d)
- Then on the created file field, you can use a fixed name like ____.blake3 (remove any path) (shift+tab shift+tab ____.blake3)
- Then proceed. (once launched, you can continue calculation in background) (Enter .. Alt+B)
return to your initial folder unselect all or enter in folder.
Adapt to your needs if you want more calculation options.
You can probably use autohotkey or powerpro or autoit or ..... to automate it using keystroke and wait.
[-edited-]
If you want a single file for all files including the one in subfolder, do not tick "Create separate checksum files for each directory" and just edit file name keeping path and replacing folder name by the one you want. %P %T are not supported in this field ! you can guess current folder or selected folder using command to store in clipboard before calling cm_create.
Re: CRC all files/folders in current dir?
You could use this as command in a button:
it would select all files and open the CRC Gui which will shown the last used settings so if it could just be pressing the button + enter to do it.
Alternative:
* If you use AutoHotkey you could make it fully automatic by sending these commands to totalcmd and pressing enter by running a script or hotkey.
* use a command line tool which accepts parameters such as (selected) files/folder and output name
Code: Select all
cm_SelectAllFiles,cm_CRCcreate
Alternative:
* If you use AutoHotkey you could make it fully automatic by sending these commands to totalcmd and pressing enter by running a script or hotkey.
* use a command line tool which accepts parameters such as (selected) files/folder and output name
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: CRC all files/folders in current dir?
Thanks for the help, friends. I figured that that command just doesn't take parameters. I just wanted to be sure I wasn't doing it wrong.
I like your autohotkey approach, since I guess I'd have to otherwise edit the filename each time. Now I just have to decide whether to write it (1) as a standalone AHK script triggered by TotalCmd that runs a cmd line utility or (2) or as an AHK key binding specific to the TotalCmd window class that sends keystrokes to TotalCmd. I guess I'm slightly leaning toward the first option.
Thanks so much for the guidance!
I like your autohotkey approach, since I guess I'd have to otherwise edit the filename each time. Now I just have to decide whether to write it (1) as a standalone AHK script triggered by TotalCmd that runs a cmd line utility or (2) or as an AHK key binding specific to the TotalCmd window class that sends keystrokes to TotalCmd. I guess I'm slightly leaning toward the first option.
Thanks so much for the guidance!
Re: CRC all files/folders in current dir?
I usually call scripts from TC using a user_command ant the a button or a hotkey. (I do use powerpro or autoit and not so often AHK)
My advise is to do by step !
You could first create a multi command ex em_doCrcB3:
That:
copy current path to clipboard,
select all Files + Folders (cm_SelectAllBoth) or do backspace(cm_GotoPreviousDir),
then call cm_crcCreate.
To automate with AHK or other
You can use hotkey to:
select Blake3 (alt+b),
then play with 2 first options (exclusive) Alt+s alt+d to select one or none in all case,
Place cursor on file field detect the right field ID or use tab sequence to reach it and delete value (del or back)
Fill with single file name (same file by folder) or use clipboard and name one file for all ... using sendkey or set field value...
Then execute sending [Enter]
if you want, you can also wait for next dialog to send it in background....
Once your AHK script is working and waiting for CRC dialog to show-up, modify your em_doCrcB3 to first call your script (should be embedded also in a em_command like em_doCrcB3_ahk).
You have to call your script berfore cm_crcCreate as TC will wait for the dialog to finish in case of multiple command (but do not wait for external em_command)
My advise is to do by step !
You could first create a multi command ex em_doCrcB3:
That:
copy current path to clipboard,
select all Files + Folders (cm_SelectAllBoth) or do backspace(cm_GotoPreviousDir),
then call cm_crcCreate.
To automate with AHK or other
You can use hotkey to:
select Blake3 (alt+b),
then play with 2 first options (exclusive) Alt+s alt+d to select one or none in all case,
Place cursor on file field detect the right field ID or use tab sequence to reach it and delete value (del or back)
Fill with single file name (same file by folder) or use clipboard and name one file for all ... using sendkey or set field value...
Then execute sending [Enter]
if you want, you can also wait for next dialog to send it in background....
Once your AHK script is working and waiting for CRC dialog to show-up, modify your em_doCrcB3 to first call your script (should be embedded also in a em_command like em_doCrcB3_ahk).
You have to call your script berfore cm_crcCreate as TC will wait for the dialog to finish in case of multiple command (but do not wait for external em_command)
Re: CRC all files/folders in current dir?
2nsp
Got it working, factoring in your great suggestions. Thanks so much for the help!
Got it working, factoring in your great suggestions. Thanks so much for the help!