Solved

Open file location with users input in bat file

Posted on 2009-07-16
2
319 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
[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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

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…
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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