Computing.Net > Forums > Disk Operating System > append command to output 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.

append command to output file

Reply to Message Icon

Name: jd_mcse
Date: May 12, 2005 at 07:25:17 Pacific
OS: DOS
CPU/Ram: Pentium
Comment:

How can I combine more that one command so that it would append the output on the same line "next to each other"? Example:

date /t + hostname + echo %username% >> c:\list.txt



Sponsored Link
Ads by Google

Response Number 1
Name: jboy
Date: May 12, 2005 at 07:58:23 Pacific
Reply:

Not really 'DOS', but Windows, right?

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


0

Response Number 2
Name: jd_mcse
Date: May 12, 2005 at 08:14:41 Pacific
Reply:


Right ... sorry!


0

Response Number 3
Name: jboy
Date: May 12, 2005 at 08:28:51 Pacific
Reply:

Well, someone might have an answer for you here, but the main focus of this forum is the DOS operating system. Bit of a different ballgame using the XP/NT command prompt, there may be more options available using the extended DOS command set.

If you just want to 'stack' commands, seems like a plain old batch file, with each line appending to the target file would do

Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.


0

Response Number 4
Name: IVO
Date: May 12, 2005 at 08:47:27 Pacific
Reply:

Just to help

For /F %A in ('HostName') Do @Echo %Date% %A %UserName% >> List.txt

Replace %A with %%A if the statement is embedded in a batch script and note the posted command fits just one line without CR/LF.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Install Dos 5.0 from CD Avance AC97 Audio driver ...



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: append command to output file

Command to combine files (append?) www.computing.net/answers/dos/command-to-combine-files-append/4881.html

output errors to a file www.computing.net/answers/dos/output-errors-to-a-file/5240.html

Add commands to text file, how? www.computing.net/answers/dos/add-commands-to-text-file-how/14102.html