#1 2011-12-30 23:31

Fiorello
Member
Registered: 2008-01-21
Posts: 10

Easily create RANDOM file names (without programming skills)

I am sure many would appreciate a possibility to >>>easily<<< create random file names without programming skills in Pascal etc.

Offline

#2 2011-12-30 23:53

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Easily create RANDOM file names (without programming skills)

Hi Fiorello, welcome.

You need no programming skills, you can also ask for an script.

Or use the available possibilities like:
1) Insert: Insert ":Hash_MD5:" as Prefix (skip extension)
2) Delete: Delete from Position 10 until the End (skip extension)

or
1) Delete: Delete from Position 1 until the End (skip extension)
2) Insert: Insert ":Hash_MD5:" as Prefix (skip extension)
3) PascalScript:  to get Randomize file name length from 36 char long hash



var
 r1,r2: integer;
 
begin
  //Randomize file name length:
  Randomize();
  r1 := RandomRange(1,2);
  r2 := RandomRange(7,29);
  FileName := Copy(FileName, r1, r2) + WideExtractFileExt(FileName);
end.


And even more randomness by doubling that prank:

1) Delete: Delete from Position 1 until the End (skip extension)

2) Insert: Insert ":Hash_MD5:" as Prefix (skip extension)
3) PascalScript: var r1,r2: integer; begin //Randomize file name length: Randomize(); r1 :=RandomRange(1,2);
r2 :=RandomRange(6,8); FileName := Copy(FileName, r1, r2) + WideExtractFileExt(FileName); end.

4) Insert: Insert ":Hash_SHA512:" as Prefix (skip extension)
5) PascalScript: var r1,r2: integer; begin //Randomize file name length: Randomize(); r1 :=RandomRange(1,3);
r2 :=RandomRange(5,55); FileName := Copy(FileName, r1, r2) + WideExtractFileExt(FileName); end.



HTH?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2011-12-31 01:39

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Easily create RANDOM file names (without programming skills)

Or you could just:
1) Delete: Delete from Position 1 until the End (skip extension)
2) Serialize: Serialize Random with length 10 (try unique) as prefix

I'm pretty sure that Stefan forgot about this feature tongue  lol


If this software has helped you, consider getting your pro version. :)

Offline

#4 2011-12-31 07:59

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Easily create RANDOM file names (without programming skills)

Right Safety. I thought what else rule could be used but missed the Random option of the serialize rule.
That can be used instead of :Hash: too. But for real randomness the file name should be from random length too.
Therefore my script works. But such basics should be implemented into the main app.
But most coders want to K.I.S.S.  big_smile (What i can understand but don't like much  tongue )


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

Board footer

Powered by FluxBB