Solved

Open file location with users input in bat file

Posted on 2009-07-16
2
330 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 70

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 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