Computing.Net > Forums > Disk Operating System > Batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file

Reply to Message Icon

Name: Matt
Date: January 23, 2000 at 00:16:14 Pacific
Comment:

wanting to write a batch file where you are required to get input from the user at various stages and store the input and use it at a later stage in the batch file.
How can this be done? the input would have to be stored as a string I think as it is text that would be entered by the user.



Sponsored Link
Ads by Google

Response Number 1
Name: Davy
Date: January 24, 2000 at 03:02:04 Pacific
Reply:

Depends on how much manipulation of the string you need. If little I would say teh best way to do it is to have the user key the string in when he runs that batch file. If the file is called BATCH.BAT and the input will be HELLO, if the user types BATCH HELLO then the code of the batch file uses
%1 to indicate the string with "Hello" in ... which can then use conditions etc.

Hope this helps


0

Response Number 2
Name: Rusty_One
Date: January 25, 2000 at 06:28:27 Pacific
Reply:

I would write the file in a similar way to above but:

At the start of file check %1 for the last position in the file, then goto that position.

When ever you want an input from the user have a restart the batch file with the new position as %1 and then set the input to %2 or futher.


0

Response Number 3
Name: Laurence
Date: February 12, 2000 at 08:34:37 Pacific
Reply:

The solution is here:
http://bigfoot.com/~batfiles/main/batchfaq.htm

See #10

Is broken in NT.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Batch file

Help!! Batch File www.computing.net/answers/dos/help-batch-file/13525.html

Batch files - - Mapping network drive www.computing.net/answers/dos/batch-files-mapping-network-drive/3809.html

Pause batch file www.computing.net/answers/dos/pause-batch-file/2810.html