Results 1 to 8 of 8

Thread: Looking For A Simple, Command-Line Random String Generator Tool

  1. #1
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    342
    Thanks
    197
    Thanked 58 Times in 42 Posts

    Looking For A Simple, Command-Line Random String Generator Tool

    Hi everyone,

    Does anyone here have, or has anyone here ever written, a simple command-line Win32 tool that can generate a random string that has switches for:
    - string length
    - character type (number, lower-case letters, upper-case letters)
    - number of strings to generate

    I spent some time searching GitHub and Stack Overflow but couldn't find anything simple like this.

    In my case, I need to generate 200 4-character long strings only using numbers.

    Any help would be great!

  2. #2
    Member Gotty's Avatar
    Join Date
    Oct 2017
    Location
    Switzerland
    Posts
    554
    Thanks
    356
    Thanked 356 Times in 193 Posts
    Do you have MS Excel?
    Do this 200 times (like in cells A1..A200):

    =RIGHT("0000"&INT(RAND()*10000);4)

  3. #3
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    342
    Thanks
    197
    Thanked 58 Times in 42 Posts
    ‚ÄčThat's a very clever technique Gotty. Unfortunately, it does not work in my old version of Excel.

    Thanks nevertheless.

  4. #4
    Member Gotty's Avatar
    Join Date
    Oct 2017
    Location
    Switzerland
    Posts
    554
    Thanks
    356
    Thanked 356 Times in 193 Posts
    How old your Excel is? Not older than Excel 97, right? That would be reeeeally old.
    Or is your Excel non-English? The formula names would be different then.
    Let me attach 3 working versions.
    Can you open any of them?
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    342
    Thanks
    197
    Thanked 58 Times in 42 Posts
    Quote Originally Posted by Gotty View Post
    How old your Excel is? Not older than Excel 97, right? That would be reeeeally old.
    Or is your Excel non-English? The formula names would be different then.
    Let me attach 3 working versions.
    Can you open any of them?
    Ah there we go. Yes, your Excel spreadsheets work perfectly.

    I also looked at the formula in cell A1 and copied it from there. That seemed to work. So probably I copied your formula in your previous post incorrectly...My mistake!

    Thanks for helping Gotty! This was very helpful!

  6. #6
    Member Gotty's Avatar
    Join Date
    Oct 2017
    Location
    Switzerland
    Posts
    554
    Thanks
    356
    Thanked 356 Times in 193 Posts
    I'm glad it worked out.

  7. #7
    Member
    Join Date
    May 2012
    Location
    United States
    Posts
    342
    Thanks
    197
    Thanked 58 Times in 42 Posts
    I still think a simple command-line tool that allows for specifying string length, numbers/uppercase/lowercase, number of total strings would be ideal to have on hand.

    This particular situation was solved with Excel but when we need to combine letters and numbers, does Excel allow for this?

    Thanks.

  8. #8
    Member Gotty's Avatar
    Join Date
    Oct 2017
    Location
    Switzerland
    Posts
    554
    Thanks
    356
    Thanked 356 Times in 193 Posts
    Yepp.
    Excel is a universal programming environment for data processing
    Attached Files Attached Files

  9. Thanks:

    comp1 (23rd July 2020)

Similar Threads

  1. Replies: 11
    Last Post: 27th October 2014, 18:39
  2. Replies: 39
    Last Post: 10th April 2014, 22:26
  3. Command Line Process Profiling Tool
    By david_werecat in forum Download Area
    Replies: 38
    Last Post: 30th December 2013, 17:12
  4. Replies: 4
    Last Post: 3rd February 2012, 03:35
  5. rnd - simple pseudo random number generator
    By encode in forum Forum Archive
    Replies: 21
    Last Post: 14th January 2008, 02:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •