batch file

Discussion in 'Software' started by wickedtaylor, Jul 17, 2004.

  1. wickedtaylor

    wickedtaylor Private First Class

    ok im trying to create a batch file menu and one of my batch files is where the can format the A drive ...they can select y to format or n for no to go back to the main menu well we are supposed to us the if on this so when i do i get an error...so if anyone know a better way plzz let me know.....
     
  2. NeoNemesis

    NeoNemesis Moutharrhea

    you could use variables such as %variable% and such. besides that i would do a search for batch file commands under google to find out more about the syntax and usage of more commands that could be useful for this job. I agree that you should use the if command also. I will try to find a good site for what you want to do.
     
  3. wickedtaylor

    wickedtaylor Private First Class

    hey thanx for the reply ...ive tried doing a google and a yahoo search but no luck..... ive tried using these strings
    if ye%1 == yes format A:
    if n%1 == no mainmenu.bat
    if qui%1 == quit :eof
    now if ive done this wrong let me know ..... but thats the way our substitue instructor was telling us how to do it....
     
  4. NeoNemesis

    NeoNemesis Moutharrhea

    if ye%1 == yes format A:
    if n%1 == no mainmenu.bat
    if qui%1 == quit exit

    Just change the quit option to exit. It's a lot easier to deal with. I would also set up a variable to display an error message if the user presses anything besides yes/no/quit. Something like "Please select an option from the menu" or something. Also, be sure to use the @echo command to display the menu.
     
  5. wickedtaylor

    wickedtaylor Private First Class

    i didnt think about the error part...lol...great now more for me to add...lol also i think i have to use the %1 at the begining dont i like %1es so they can hit y or mabe im wrong
     
  6. NeoNemesis

    NeoNemesis Moutharrhea

    I have one question out of all of this. Where are they teaching you how to write batch files?
     
  7. wickedtaylor

    wickedtaylor Private First Class

    IVY tech college in bloomington, Indiana
     
  8. NeoNemesis

    NeoNemesis Moutharrhea

    And they do a whole class on it?
     
  9. wickedtaylor

    wickedtaylor Private First Class

    yes they do ...actually they do 2 classes 1 basic and the other advance....
     
  10. NeoNemesis

    NeoNemesis Moutharrhea

    Thats very cool. I just didn't think that batch file making was a language, let alone is there enough to do with it.
     
  11. wickedtaylor

    wickedtaylor Private First Class

    lol...i figured out what i did wrong....thanx for the help thou...
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds