Solved

Input in a Batch file

Posted on 2004-07-30
4
888 Views
Last Modified: 2012-06-21
Hi everybody
how can i give input in a batch file??
Thanx
0
Comment
Question by:lightin_star
4 Comments
 
LVL 4

Accepted Solution

by:
rohanpandya earned 50 total points
ID: 11676190
use %1 upto %9

 like i write content of batch file

  net share sharename = %1

 this is content of a.bat

 now when you run a.bat run as

     a "C:\rohan" so"c:\rohan" is input of batch file
0
 
LVL 3

Expert Comment

by:taus01
ID: 11677261
If you want interactive (not command line based) input and you run w2000 or newer you can use:

SET /P variable=[promptString]

That prompts the user for input and after pressing return the value is stored in the specified environment variable for later use.

Sascha
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tembedded WB animatid gifs not animated on some pcs 2 83
SUM 2 INTEGER ARRAYS INTO 1 10 108
Programatically extract date from website 8 79
SQL Insert parts by customer 12 42
A short article about problems I had with the new location API and permissions in Marshmallow
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question