SMF For Free Support Forum
Signup For Free Forum
April 17, 2014, 07:54:20 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register Chat  

Pages: [1]
  Print  
Author Topic: Batch/basic Querie  (Read 1799 times)
0 Members and 1 Guest are viewing this topic.
sanga282
SMF For Free Member
*
Offline Offline

Posts: 57


View Profile WWW
Total Badges: 14
Badges: (View All)
Topic Starter Combination Level 3 Level 2 Level 1
« on: August 04, 2008, 06:38:55 am »

Does anyone know how i would implement a directive into a .bat file that allows the user to go to what they typed ie
In a normal batch file you have this
Code:
if %input%==item1 goto item1
but you need that for every directive there is so if you had item1, item2, item3, item4 and item5 you would have this
Code:
if %input%==item1 goto item1
if %input%==item2 goto item2
if %input%==item3 goto item3
if %input%==item4 goto item4
if %input%==item5 goto item5
How would i get it so that if i had 56 items i wouldn't need 56 lines of code only one that is dynamic like
Code:
if %input%=={help} goto {input}
So that way it goes to the input the help and input are the bits i need help with, its kinda hard if anyone has a solution please let me know, it is not an alternative for me to have lines and lines of code because in this instance i am dealing with about 14000 directives
Logged



Pages: [1]
  Print  
 
Jump to:  



Powered by SMF 1.1.19 | SMF © 2013, Simple Machines