Page 1 of 1

Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-04-30, 11:38 UTC
by hlloyge
Hello!

I'd like to have an option to exclude certain filetypes when creating checksums of folders with files. Use case: music with album art. I'd like the possibility to create checksums of only music files, and not album art files. It would be something like adding a bar in scanner options window with excluding filetypes like this:

Excluded: .jpg .png .webp

So everything else inside would be scanned and added in checksum file, except excluded files.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-04-30, 13:28 UTC
by Marc23
In the meantime, is it possible to link two actions in one button or action ?
Select *.jpg;*.png;*.webp and then Invert Selection

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-04-30, 13:41 UTC
by beb
The way I can see workable so far:
1. Configuration - Options - Ignore lists [check] > *.jpg;*.png;*.webp
2. Calculate the checksum for the folders in question (*.jpg;*.png;*.webp won't be included).
I support the separate exclusion option [checkbox, field, and list] for the checksum operations.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-04-30, 15:37 UTC
by Fla$her
2hlloyge
You may be interested in such a button:

Code: Select all

TOTALCMD#BAR#DATA
%ComSpec% /q/c for %d in
("%S") do if exist "%%~d\" "%%COMMANDER_PATH%%\Utils\RHash\rhash.exe" "%%~d\*.*" -i -p"%%{sha1} *%%f\n" -o "%%~d\%%~d.sha" --exclude=jpg,png,webp
wcmicons.dll,61
Calculate SHA for selected folders without jpg, png and webp

1
RHash supports many algorithms, but so far without Blake 3. However, on the same algorithms, it is performed much faster than TC.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-04-30, 17:02 UTC
by beb
Fla$her wrote: 2023-04-30, 15:37 UTC RHash
Interesting tool. Thanks for sharing.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-05-01, 13:31 UTC
by Marc23
Hi,

Another way: in selection ( Num + ) type:

Code: Select all

* | *.jpg *.png *.webp
Add *. if you want to ignore sub-directory selection

Code: Select all

* | *.jpg *.png *.webp *.
(and save it for next usage)

I've been using TC for 19 years, but I just discovered that we can chain several cm_ commands in one line.
Shame on me :oops: I try some other solutions but I couldn't put this command on a button, even with cm_SpreadSelection or cm_Select :|
(i.e select *.jpg *.png *.webp and then reverse selection does not works)

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-05-01, 14:08 UTC
by beb
Marc23 wrote: 2023-05-01, 13:31 UTC ...I couldn't put this command on a button...
It could be done by a different but still similar way (using search instead of selection):

Code: Select all

[searches]
musiccrc_SearchFor=* | *.jpg *.png *.webp
musiccrc_SearchIn=d:\MyMusic
musiccrc_SearchText=
musiccrc_SearchFlags=0|007002010021||||||||22220|0000|||
or in GUI: "Search..." or [Alt+F7] or [Shift+Alt +F7]

Code: Select all

step 1. Search for:* | *.jpg *.png *.webp
step 2. Search in:d:\MyMusic
step 3. "Advanced" tab - "Attributes" [+] {checked} - "Directory" [ ] {unckecked}
step 3. "Load/Save" tab - "Save" button > opt for name "musiccrc" upon saving
usercmd.ini

Code: Select all

[em_test_music_crc]
cmd=loadsearch=musiccrc
button:

Code: Select all

TOTALCMD#BAR#DATA
em_test_music_crc

wciconex.dll
Music_crc_test


10029
Pressing the button a user would get all the files except excluded *.jpg *.png *.webp.
Then the CRC could be calculated as usual.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-05-01, 14:36 UTC
by Fla$her
beb wrote: 2023-04-30, 17:02 UTCInteresting tool. Thanks for sharing.
You're welcome. I still have the old button for the selected files:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Utils\RHash\rhash.exe -i -p"%{sha1} *%f\n"
--file-list="%UL" -o "%B.sha"
wcmicons.dll,61
Calculate SHA for selected files

1
2Marc23, beb
The request concerns files only in the selected directories. The selection of files in the active panel doesn't affect this in any way.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-10-02, 13:03 UTC
by hlloyge
Fla$her wrote: 2023-04-30, 15:37 UTC 2hlloyge
You may be interested in such a button:

Code: Select all

TOTALCMD#BAR#DATA
%ComSpec% /q/c for %d in
("%S") do if exist "%%~d\" "%%COMMANDER_PATH%%\Utils\RHash\rhash.exe" "%%~d\*.*" -i -p"%%{sha1} *%%f\n" -o "%%~d\%%~d.sha" --exclude=jpg,png,webp
wcmicons.dll,61
Calculate SHA for selected folders without jpg, png and webp

1
RHash supports many algorithms, but so far without Blake 3. However, on the same algorithms, it is performed much faster than TC.
I am so sorry I neglected this thread, to be honest, I forgot abut it.
Your button works, I set it up to make sha256 files, and it's good.
My workflow is to select folder and make sha256 in that folder after calculation. But there is one more thing that TC does, and that's making linux compatible sha256 files, and that's crucial for me, as all my files (and music) is stored on linux-based storage.

Re: Option to exclude certain extensions when creating CRC checksums?

Posted: 2023-10-02, 14:58 UTC
by Fla$her
2hlloyge
Add --utf8 to the end of the parameters.
The problem will only be in the absence of a BOM signature, i.e. there will be no UTF-8 encoding for names in the ASCII range.