How to input user var into text file

June 17, 2009 at 07:35:28
Specs: Windows XP
Hi there,

Need some help here.

Im trying to figure up how to perform the following from a .bat file
1. obtain user input (assuming user input as var A)
2. List all input as summary
2. input var A into a middle of a file.

This will be perform in WinXP en

Eg, my batch file content:

<batch file : Ask User.BAT>

@echo off
@echo off
set /p var1="Enter your name : "
set /p var2="Enter staff number : "
set /p var3="Enter Logon ID : "
set /p var4="Department : "

<end>

Moving fwd, from the var parameter to be fill into simple form,
In a text file as follow:

<text file : BasicInfoTemp.TXT>

Staff ID : %var1%
Staff number : %var2%
Windows ID : %var3%
Department : %var4%

<end>

My problem now is …
I don’t know how to automate the input variable captu to the file..

The idea is to auto generate a new file to as follow in drive c:

Staff ID : rzpwhm
Staff number : 95/12176
Windows ID : UserHRD01
Department : Human Resource

I would seek your kind help & advice as I have tried this for numbers of day with a failure result.
Thanks ++++

Regards,
melayu.lelaki@yahoo.com


See More: How to input user var into text file

Report •


#1
June 17, 2009 at 08:08:18
repost in programing forum.

Change Is Good
http://www.citizenlink.org/Stopligh...


Report •
Related Solutions


Ask Question