in reply to Re: Re: Generating random 6 digit numbers
in thread Generating random 6 digit numbers

I've done something like that.

Instead of using digits, I used 6 (or howevermany) random characters. I used only letters and numbers that didn't look like other characters, so it could be safe from human transcription.

But, after generating the random file name, it's trivial to test if it's a duplicate because the directory itself is a record! You don't have to maintain your own hash. Just see if the candidate file name already exists.

—John

  • Comment on Re: Re: Re: Generating random 6 digit numbers