Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect type with a filename

Status
Not open for further replies.
Sep 1, 2003
10
0
0
NL
I'm creating an "old style" batch script. The results of this script are stored in a logfile. Now I want to include the contents of another logfile into this first logfile. The name of this file is each day different. The second logfile resides in a directory, and is the only file that is present. How can I achieve this?

I tried the following construction:
c:\> dir directory /b > filename.txt (which now contains the filename I want to display)
c:\> type < filename.txt

All I get is an error: "The syntax of the command is incorrect
 
Hello SysAdminUnix,

Would this do?
Code:
c:\>dir directory /b > filename.txt
::this will make old log appeared after new data
c:\>type oldlogfile >> filename.txt
::Alternative this will make new data appeared appending after the old log
c:\>dir directory /b >> oldlogfile
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top