Solved

Open file location with users input in bat file

Posted on 2009-07-16
2
284 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 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
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
Comment Utility
Worked a treat.  Thank you very much
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

16 Experts available now in Live!

Get 1:1 Help Now