You are not logged in.
Question was never "how" but "why"...
Offline
I dag up some old topics where the same feature was discussed:
Offline
Hi, this is my code to random change the filename;
var
a, b, c: Integer;
s: String;
begin
Randomize;
s := '';
For a:=0 To 9 Do
Begin
b := RandomRange(1, 3);
c := RandomRange(0, 26);
If ( b = 1 ) Then
b := 65 + c
Else
b := 97 + c;
s := s + Chr(b);
End;
FileName := s + WideExtractFileExt(FileName);
end.
Last edited by Max_Cohen (2013-08-09 18:37)
Offline
Good work Max.
Just a small note on improving your script: Randomize function should only be called once during initialization of the script, otherwise the randomness distribution is reset on every filename and some properties of randomness are lost. To find you how to initialize a script have a look at this example: ReNamer:Scripts:Initialize.
You might also be interested in checking out this script: ReNamer:Scripts:Random_characters_and_length.
Offline