Computing.Net > Forums > Windows 2000 > How to store and retrieve values?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to store and retrieve values?

Reply to Message Icon

Name: albert2u
Date: June 20, 2007 at 19:40:10 Pacific
OS: Windows2000
CPU/Ram: Pentium Xeon
Product: Dell
Comment:

Hi,

I had wrote some lines to get the user inputs in win2k dos prompt. But how can i store in a temp file and retrieve it and pass it in to another batch file for anohter process?

@echo off
set INPUT=
set /P INPUT=Type input: %=%
set /P INPUT2=Type input: %=%
if "%INPUT%"=="" goto input
echo Your input was: %INPUT%
if "%INPUT2%"==""goto input
echo Your input2 was: %INPUT2%

Can anyone help me in this. Appreciated very much.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: June 21, 2007 at 02:59:11 Pacific
Reply:

[1] I don't see the label it's trying to GOTO.

[2] Once you've got the vars set, thay are available to other processes. Do you need them in FILEs?


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

M2



0

Response Number 2
Name: albert2u
Date: June 21, 2007 at 03:17:08 Pacific
Reply:

m2,sorry about that, actually i will need to call anohter batch file.

@echo off
set INPUT=
set /P INPUT=Type input: %=%
set /P INPUT2=Type input: %=%
if "%INPUT%"=="" goto input
echo Your input was: %INPUT%
if "%INPUT2%"==""goto input
echo Your input2 was: %INPUT2%
Call process.bat

One question, if i do not want to store the values into a temp file. Can i just pass the captured values directly to another batch?

If it can't pass it like that, then i will need to store in a File.

Tqvm.

albert2u


0

Response Number 3
Name: Mechanix2Go
Date: June 21, 2007 at 03:26:04 Pacific
Reply:

::== bat1.bat
set name=abc
call bat2.bat
::==

::== bat2.bat
@echo the name is %name%
::==



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

M2



0

Response Number 4
Name: albert2u
Date: June 22, 2007 at 01:24:01 Pacific
Reply:

M2,

Thanks!
It works!

albert2u


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: How to store and retrieve values?

how to install and configure isa on www.computing.net/answers/windows-2000/how-to-install-and-configure-isa-on/59576.html

How to Format and partition HD. www.computing.net/answers/windows-2000/how-to-format-and-partition-hd/60177.html

how to formating and partition www.computing.net/answers/windows-2000/how-to-formating-and-partition-/36426.html