Random (File Name) Numbering

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Random (File Name) Numbering

Postby dec » Thu Oct 14, 2021 6:35 am

...
> secondly, i couldn't find a way to use it to add random/non-sequential numbers to the name (so that files would sort randomly eg mp3 files)
>
> in the interim, my 'solution' was to add PADDED sequential numbers as prefix, in my case 4 digits, and THEN, remove all the digits except the last one. when sorted, this gives me random groups of 0-9 ie breaks up the sorted alpha playing order. if i wanted random groups of 100's, i could have left the last two digits
>
> but an easier better way would be good
dec
 
Posts: 3
Joined: Thu Oct 14, 2021 6:31 am

Re: Random (File Name) Numbering

Postby Luuk » Thu Oct 14, 2021 8:08 am

This link presents some different ways to create custom random strings... viewtopic.php?f=4&t=5663
With a commercial license 'Special, Javascript Renaming' can prefix 4 random digits to mp3 files like...

if (/mp3/i.test(ext)) {
function random() {
string = ''
list = '0123456789'
for (var i=0; i<4; i++) {string += list.charAt(Math.random()*list.length)}
return string}
newName = random() + name}
Luuk
 
Posts: 334
Joined: Fri Feb 21, 2020 10:58 pm


Return to BRU Support


cron