Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Need help with a batch file with up to eight different user inputs...  (Read 2888 times)

0 Members and 1 Guest are viewing this topic.

Psycho0426

    Topic Starter


    Newbie

    I have a question for anyone who can answer it.  I need to write a batch file for to automate some things for someone who is computer illiterate.  The problem is that it needs to ask her up to 8 multi word descriptions, that will get passed to a seperate program.  There may not always be 8 descriptions, but in every case thay will not be one word.  I can write very simple batch files with a single variable, but this is way over my head.  I'll show an example of what I'm trying to accomplish below.  Any help would be greatly appreciated.

    The directory structure involved.

    c:\archives
    c:\archives\1
    c:\archives\2
    c:\archives\3
    c:\archives\4
    c:\archives\5
    c:\archives\6
    c:\archives\7
    c:\archives\8
    c:\archives\backups

    The user inputs *should* be something like this...

    What's on the first disk?
    What's on the second disk?
    etc...

    Sample answers might be like the following:

    Nico's Pictures
    Family Geneology Info
    etc...

    Basically, we have a bunch of DVD backups from my Mother's old unstable computer, but we want to a.) recover the important data, & b.) create a new backup that is organized the way my Mother will understand it.  The contents of each directory are compressed with RAR to save space, so I need to check for errorlevels from each step.  Right now, I can get most of it, but I keep getting stuck with the user inputs.  So how do you ask the user for a variable that could be more than one word up to eight seperate times?  She may not always need eight, but sometimes she will.  It all depends on how much is on the original DVD that she wants to save.

       Sorry for such a complicated one, but my idea of a tough batch file involves one single variable and a lot of excess code.  I just don't understand loops other than simple IF THEN statements.  Thank you very much for your help!

    Dias de verano

    • Guest
    Re: Need help with a batch file with up to eight different user inputs...
    « Reply #1 on: August 03, 2008, 06:11:34 AM »
    A string variable can be as long as you like, and have as many "words" as you want. Did you think that a variable can only be one word?



    Psycho0426

      Topic Starter


      Newbie

      Re: Need help with a batch file with up to eight different user inputs...
      « Reply #2 on: August 05, 2008, 02:35:09 AM »
      Actually...yah, I sure did.  So how should I write the 8 user inputs?  I want to avoid having my mother running the batch followed by all 8 variables in the same line.  Knowing her, she'll have 8 very long titles.  <BIG EVIL GRIN>  Thanks again...