Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Input in a Batch file

Posted on 2004-07-30
4
Medium Priority
?
891 Views
Last Modified: 2012-06-21
Hi everybody
how can i give input in a batch file??
Thanx
0
Comment
Question by:lightin_star
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Accepted Solution

by:
rohanpandya earned 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression

704 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