Feature Request: Randomize filenames

Advanced Renamer forum
#1 : 18/04-15 14:40
arwul
arwul
Posts: 80
How about 'randomizing filenames' ?

Setting: length of filename (with a maximum, say 20 characters)
allowing : A-Z a-z and digital
set extension

e.g.

vmy14nt0ugh6c4wotak7.tst
k6iji5mmqmki2chnq0lg.tst
kalyqtwrzws87b1re2er.tst
1av8uqdx9l5hshczxu0r.tst

etc.

=


18/04-15 14:40
#2 : 19/04-15 22:32
ivan
ivan
Posts: 1
Reply to #1:

Sequence:

var a = 7; //lenght you need
var text = '';
var poss1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'

for(var i=0; i < a; i++)
{
text += poss1.charAt(Math.floor(Math.random() * poss1.length));
}
return item.newBasename = text;


19/04-15 22:32
#3 : 27/04-15 15:58
arwul
arwul
Posts: 80
Reply to #2:

Sorry for the delay..

Many thanks indeed. Wonderful.
Of course added this to my presets.

Maybe one day it will be available in Advanced Renamer:
Randomize names, parameters
Set name length [__] characters (for example 20)
[X] Upper Case
[X] Lower Case
[X] Use numbers

Anyway, thanks!

-


27/04-15 15:58