Solved

Input in a Batch file

Posted on 2004-07-30
4
886 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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 …

910 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now