Rename - Randomize Function

Have a suggestion for "Everything"? Please post it here.
Post Reply
therube
Posts: 1997
Joined: Thu Sep 03, 2009 6:48 pm

Rename - Randomize Function

Post by therube » Tue Dec 04, 2018 3:10 am

Everything Rename - Randomize Function, RND()

Might be nice to have a Randomize Function.
Such that say you could take a set of names that you could then change.

Code: Select all

060975902c5dacb88d1f2128eb85aa406d6d79f5b8
0a06807c8f9748d4e8fb76af98ad53aa3082949504
0ec6bf5b49cb29a78d005576ed0f8b6fc5283328f5
0f21ec17b7fbd963a20bd9fcba0bcc24895736d0c9
103d6e35897eadeaf1c4fe211cedd2c11a24ee5610
1219e2a8978f7f1d02a7ce302dcddcae6ce29079a8
$rnd(3,a); alpha

abc
cba
xyz
jaq

$rnd(3,A); alpha-numeric

a1c
3ba
x77
jaq

$rnd(3,n); numeric

123
321
000
996

void
Site Admin
Posts: 4265
Joined: Fri Oct 16, 2009 11:31 pm

Re: Rename - Randomize Function

Post by void » Wed Dec 05, 2018 9:18 am

I've added to my TODO list: add a scripting language to the Everything renamer.

Something like:
$eval(Math.floor(math.random() * 26) + 'a')

Thanks for the suggestion.

Why random though? would generating a hash be more useful? eg the md5sum, sha1 or sha256 hash of part of the filename?

therube
Posts: 1997
Joined: Thu Sep 03, 2009 6:48 pm

Re: Rename - Randomize Function

Post by therube » Wed Dec 05, 2018 2:08 pm

In this instance, I was just thinking of long file names (path+file name), where some of the directories are similar to what is noted above, & if I could shorten them such that the total path length < ~255, it would be less trouble for other programs that would otherwise have trouble dealing with such paths (& files).

So if I periodically, path:len:>254, then if there is something common, like a directory tree with rather worthless random-ish paths, by shortening the rather long-ish path parts, so if I dropped from say a 20 character path segment to a (random, & random because in this case the actual path part name is immaterial) 3 character path, I've saved 17 characters, & with that a greater possibility of dropping below 255 char path lengths where many programs have issues.

Post Reply