• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 893
  • Last Modified:

Input in a Batch file

Hi everybody
how can i give input in a batch file??
Thanx
0
lightin_star
Asked:
lightin_star
1 Solution
 
rohanpandyaCommented:
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
 
taus01Commented:
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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now