#1 2013-03-17 18:06

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

A new renaming rule called Random?

There has been a number of questions and suggestions about this one, so I would like to put this up for a discussion.

The idea is to be able to quickly and easily replace the filename with a random set of characters. Currently, there we have an ability to insert a random set of digits in the filename using the Serialize rule. This however is limited to the digits only and in order to use letters or a user-defined set of characters we must employ a PascalScript rule.

How about a dedicated rule called Random?

It can have a set of easy options like:

  • Which characters to use, e.g. digits, letters and user defined.

  • The length of the random sequence.

  • Where to insert, e.g. prefix, suffix, position, replace the name.

Offline

#2 2013-03-18 03:57

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

Re: A new renaming rule called Random?

I like the idea per se (only the engineering part that is-), but what's the use of a file name that does NOT reflect its contents?

Offline

#3 2013-03-18 10:26

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

Re: A new renaming rule called Random?

Hi Denis,

When I visit my "New topics" page, I see a flag "Needs your input" (in red text), with a hyperlink to this thread.

I expected this flag to be user-specific: Once a user posts his response, this flag should reset automatically.
(like a poll on websites, where each user gets to vote only once.)

But here, the flag remains active, and when I visit the thread yet I don't see any such thing.

Offline

#4 2013-03-18 14:38

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: A new renaming rule called Random?

I too do not see much use for random filenames right now, but quite a few users have already asked for this feature, including recently. I'm wondering if a dedicated rule is the way to go and whether there are other options which we may want to add to this rule.

P.S. Regarding the "needs your input", it is a generic announcement feature on the forum. I just wanted to bring some attention to the discussion.

Offline

#5 2013-03-18 15:23

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

Re: A new renaming rule called Random?

Well, the answer could lie in understanding how exactly they would use it.

From the mathematical side of it, here are some additional considerations:
1. User-defined seed for the random sequence.
2. Facility to use system date stamp as seed for random sequence generation.
3. Method to prevent duplicates (after all this high-tech random-number generation, it would be a let down to affix serialized suffixes for duplicated files).
4. Fake randomized name (with a specified string as key; user can retrieve the real name of the file with a inverse algorithm if the key is available.)
    Then provide a command like the "User input" command to restore the original file names.

Real value can be added only after understanding what they are trying to do.

For example, this can't be for encryption or deniability purposes.
If it is to randomize the playing order for music tracks, then almost all players can randomize them. That should not be attempted.

So the best way is to ask them directly, and then decide how to implement that.

Offline

#6 2013-03-18 16:26

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

Re: A new renaming rule called Random?

@narayan, but most of that things don't have anything to do with randomizing, you are talking more about encrypting and decrypting names

What I think Denis was thinking is to leave more room on Serialize and create something like Randomize.

I'm not really against it, is not that I can't live without it, but probably if it was there we would use it.

In my opinion for the design to be good, the Serialize and "Randomize" would be very very similar, both providing "repeat" options (until folder changes or for a number of times). Also both could be expanded to be capable of using alphanumeric values, somehow like with "strip" rule we can customize what we want it to contain. This way both rules would be more rich than they are now.

Last edited by SafetyCar (2013-03-18 16:49)


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

Offline

#7 2013-03-18 20:15

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

Re: A new renaming rule called Random?

The only need for randomizing i saw was to randomize file names before deleting them.

Usually i suggest

Serialize: Serialize Random with length 8 (try unique) as prefix

or

1) Insert: Insert ":Hash_SHA256:#" as Prefix (skip extension)
perhaps 2) Strip: Strip characters "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (skip extension)
3) Delete: Delete from Position 8 until Delimiter "#" (skip extension)

I see no need for an additional rule Random.
Only maybe for Insert Rule something like :random_digits: and :random_alpha: which inserts 4 signs each. Most flexible.

.


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

#8 2013-03-18 21:04

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: A new renaming rule called Random?

The most recent feature request was explained in the following way...

David wrote:

One of the purposes why such an option may be welcome by some is to rename a huge repository of image files with unique though meaningless names preventing painstaking manual renaming of files with name collisions when updating. If the filename is unimportant in specific situations, using such an automation can save a lot of time, even with later updating of such a database with new files. It can be done even now, with the Serialize feature, but extending acceptable scope of characters would widen the usage even more and would allow grouping of files even by the types of characters used. One possible example.

Simple randomization of filenames keeps coming up in forums and emails every now and then. Encryption/decryption is a separate thing and I wouldn't want to go that far; there are plenty of specialized cryptographic tools to do that properly.

Offline

#9 2013-03-19 06:50

narayan
Senior Member
Registered: 2009-02-08
Posts: 471

Re: A new renaming rule called Random?

Denis, I merely listed those features as mathematically possible things, but also stated that unless we know the user's intention, they are not worth including. I have pointed out that encryption/deniability cannot be the aim behind this. But if we don't have user's specific inputs, the best we can do is to first list all possible features and then eliminate some of them logically.

I will apply this elimination to what both of you posted:

The sample quote you mentioned may also not make a good use case, as it is more appropriate to use EXIF properties to name the images (if they came from a camera, that is). A typical example is to name the file after {camera ID+Date taken}.

Stefan, if the file name is randomized before deleting, it does not solve the user's security problem.

  • If he securely wipes the disk (by overwriting the disk with random data), he won't need this step.

  • Just randomizing the file names won't protect him, because anyone can retrieve the files with the random names and open them. (Randomization will make the snooper work harder, but eventually he will find what he wanted. In some cases he can search for content and easily find what he wants.)

Offline

#10 2013-03-19 20:15

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

Re: A new renaming rule called Random?

Well, it wasn't that hard, to do a script:

const
  units = '0123456789abcdefghijklmnopqrstuvwxyz';

function Random(L: Integer): WideString;
begin
  Result := '';
  while (length(Result) < L) do
    Result := units[RandomRange(1, length(units))] + Result;
end;

begin
  FileName := Random(20) + WideExtractFileExt(FileName);
end.

Maybe something similar to this could be added into the default scripts that come with renamer?? Also maybe some one of the other current ones can be left just in the wiki?

Just trying to give some ideas.


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

Offline

Board footer

Powered by FluxBB