Solved

Open file location with users input in bat file

Posted on 2009-07-16
2
306 Views
Last Modified: 2012-08-14
Hello eveyone.

this more than likely an easy one for you, but i am a novice on dos.

What i want to for a bat file to stay on a users desktop, that points to on part of our file structure, but when they click on it, it pops up with a question asking for a number, then when they press enter it asks for another number. Then once these have been entered it opens windows explorer in that location.

IE,

start \\server\folder1\folder2\number1\number2\

I have done this in office and everywhere else we need, but i can not get a value to be entered.

Any help please.

Baker
0
Comment
Question by:Bakersville
2 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 24870632
to prompt for user input, use
set /P var=prompt.

In your case:

@echo off
set /P num1=first number?
set /P num2=second number?
start explorer /e,/r=\\server\folder1\folder2\%num1%\%num2%

0
 
LVL 1

Author Closing Comment

by:Bakersville
ID: 31604299
Worked a treat.  Thank you very much
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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