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

Author Topic: CHOICE problems...  (Read 3938 times)

0 Members and 1 Guest are viewing this topic.

helper

    Topic Starter


    Intermediate
  • Thanked: 1
    CHOICE problems...
    « on: November 06, 2008, 05:52:11 PM »
    For the life of me, I can't figure out the CHOICE command. Please help me! I am running Windows 98.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: CHOICE problems...
    « Reply #1 on: November 06, 2008, 07:47:49 PM »
    Here is the help page:
    http://www.computerhope.com/choicehl.htm
    This command waits for you to type something and type continues.
    It can wait awhile and then go on anyhow if you are busy. Otherwise, the choice you made can alter something the batch file will do.  :)
    Why not give an example of what you think the choice command will do?

    Dusty



      Egghead

    • I could if she would, but she won't so I don't.
    • Thanked: 75
    • Experience: Beginner
    • OS: Windows XP
    Re: CHOICE problems...
    « Reply #2 on: November 06, 2008, 07:51:16 PM »
    Here's some guidance on Choice.  It would really really help if you posted your code or indicated what problems you have.
    One good deed is worth more than a year of good intentions.

    helper

      Topic Starter


      Intermediate
    • Thanked: 1
      Re: CHOICE problems...
      « Reply #3 on: November 06, 2008, 09:44:29 PM »
      Thanks for the help. The problem was i was putting: ...IF ERRORLEVEL = 1 THEN... All is fixed now but... Is it possible to read and write from and to a file in batch?

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: CHOICE problems...
      « Reply #4 on: November 07, 2008, 10:10:27 PM »
      It is possible depending on the file type. If raw ascii definately! If some other format that generally cant be viewed with dos editor or notepad in clear text form, batch will likely not be able to read the information and edit the information in an array configuration for example to shuffed data around or populate data in the file and save it properly.

      Knowing the conditional format of the data is helpful as well... is it comma delimited or tab delimited etc. Is the data your editing always popupated x-many characters down or after a unique identifier in the file such as TOTAL, in which a value can be populated after Total etc.

      helper

        Topic Starter


        Intermediate
      • Thanked: 1
        Re: CHOICE problems...
        « Reply #5 on: November 08, 2008, 05:31:06 AM »
        I just want to do this: read a character from a file, convert the character depending on what the character is, and then save it to a file. And then the same thing for the second, third, fourth, ect, character. So what is the command to read and write from and to a file?

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: CHOICE problems...
        « Reply #6 on: November 08, 2008, 07:09:42 PM »
        No the CHOICE command.  :o You would use some form of the FOR command with one of the functions used in batch files. Look in the DOS tutorial on this site.