Computing.Net > Forums > Windows XP > How to input user var into text file

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 input user var into text file

Reply to Message Icon

Name: rzpwhm
Date: June 17, 2009 at 07:35:28 Pacific
OS: Windows XP
Subcategory: General
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: lurkswithin
Date: June 17, 2009 at 08:08:18 Pacific
Reply:

repost in programing forum.

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


0
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 XP Forum Home


Sponsored links

Ads by Google


Results for: How to input user var into text file

How to record User Activity ? www.computing.net/answers/windows-xp/how-to-record-user-activity-/65931.html

How to combine user accts? www.computing.net/answers/windows-xp/how-to-combine-user-accts/171494.html

Temporary Text Files www.computing.net/answers/windows-xp/temporary-text-files/60550.html