Page 1 of 1

[solved] Trying to combine folderreport with hash or hashlist

Posted: 17 Feb 2025 19:48
by daniel_m
I made a button to copy the list of files in the current folder and subfolders to the clipboard: folderreport("filesrel:{fullname}<tab>{size br}","c",,"r");

The output looks like this:
Test Folder\Test\test.file
	
3845
Some other.file
	
345820
...

Now I'd like to add the sha1 sum to each file with hash or hashlist ... but I don't know how 😥

This is what I'd like to achieve:
Test Folder\Test\test.file
	
742d9578c4c9c540a1c04881931279fff90f58a5
	
3845
Some other.file
	
9be4f983995f1f63404e8f7207f6b825ccfe0348
	
345820
...


Edit: jupe's code does the trick folderreport("filesrel:{fullname}<tab>{prop:#hash.SHA1}<tab>{size br}","c",,"r");

Re: [help needed] Trying to combine folderreport with hash or hashlist

Posted: 17 Feb 2025 20:12
by highend
E.g. by using a regular loop
You'd need a loop afterwards to either weave in the hashes and a (complicated) regex or calculate them one by one

So use quicksearch(), loop over, trim <curpath> from each item (to make them relative), use filesize(), hash() and at the end copytext to put the result into the clipboard

Re: [help needed] Trying to combine folderreport with hash or hashlist

Posted: 17 Feb 2025 20:18
by jupe

Code: Select all

folderreport("filesrel:{fullname}<tab>{prop:#hash.SHA1}<tab>{size br}","c",,"r");

Re: [help needed] Trying to combine folderreport with hash or hashlist

Posted: 17 Feb 2025 20:24
by daniel_m
Thanks for your suggestions, highend and jupe.

I didn't know about extended properties. Your code works very well, thanks jupe!