Computing.Net > Forums > Disk Operating System > batch file writing to a 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.

batch file writing to a text file??

Reply to Message Icon

Name: kevin
Date: May 5, 2003 at 12:06:32 Pacific
OS: Windows 2000
CPU/Ram: Pentium 3 512 RAM
Comment:

I am using the following statement to capture the username of all the users who execute my batch file:

echo %username% >username.txt

The problem is that it only captures 1 username and then the next time someone executes the batch file, it overwrites the previous username with the new username. How do I set up the file to capture all usernames in an ongoing list, and not just the single most recent?



Sponsored Link
Ads by Google

Response Number 1
Name: Secret_Doom
Date: May 5, 2003 at 13:25:42 Pacific
Reply:

Use this, instead:

echo %username%>>username.txt

-- Leonardo Pignataro - Secret_Doom --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 2
Name: IVO
Date: May 5, 2003 at 13:26:15 Pacific
Reply:

Modify your statement as follow

echo %username% >> username.txt


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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: batch file writing to a text file??

Read batch file and write in a Text www.computing.net/answers/dos/read-batch-file-and-write-in-a-text/16653.html

Re-direct ">" info to a text file WITHOUT re-creating that text file www.computing.net/answers/dos/redirect-info-to-a-text-file-without-recreating-that-text-file/2058.html

writing to file www.computing.net/answers/dos/writing-to-file/12430.html