Computing.Net > Forums > Programming > Batch file-allowing user input path

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Batch file-allowing user input path

Reply to Message Icon

Name: serpentsknight
Date: January 16, 2008 at 06:30:40 Pacific
OS: xp
CPU/Ram: 1gb
Product: dell
Comment:

I have created a batch file to install updates from a mapped drive as follows:

:start
CLS
ECHO Please enter correct update...
ECHO.
ECHO 1: Update 1

SET /P CHOICE=

IF %CHOICE% EQU 1 GOTO A

:A
ECHO.

net use q: \\test\update

xcopy Q:\updates4xp\winxp.ini
pause
GOTO start

Its working fine but I want to allow more options and for the user to enter the path of the updates. Any ideas on how to do this?



Sponsored Link
Ads by Google

Response Number 1
Name: Strick80
Date: January 17, 2008 at 04:54:59 Pacific
Reply:

I wanted to do this a while back but I dont think there is any way. With XP they cut out the user input commands with cmd.

I used this site to get all my batch stuff http://www.ss64.com/nt/
(it is XP)

regards

Strick80


0

Response Number 2
Name: Mechanix2Go
Date: January 17, 2008 at 09:08:08 Pacific
Reply:

"I wanted to do this a while back but I dont think there is any way. With XP they cut out the user input commands with cmd."

LOL


::==
@echo off
setLocal EnableDelayedExpansion

cls
echo 1: Update 1
echo 2: Update 2
set/p u=Please enter correct update:
set/p p=Please enter path

goto !u!

:1
echo here's where you do update !u! on path !p!
goto :eof

:2
echo here's where you do update !u! on path !p!



=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 3
Name: serpentsknight
Date: January 21, 2008 at 11:17:27 Pacific
Reply:

Thanks guys i got through with it


0
Reply to Message Icon

Related Posts

See More


Problem with Dev C++ and ... File extension Rename



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file-allowing user input path

Batch File Input Shortcuts www.computing.net/answers/programming/batch-file-input-shortcuts/18478.html

Batch File|Input from txt file www.computing.net/answers/programming/batch-fileinput-from-txt-file-/17293.html

Batch file help www.computing.net/answers/programming/batch-file-help/12261.html