KrisC
KrisC

Reputation: 79

Windows type command truncating output

I have 3 servers which are running Windows 2003 Server edition. I am trying to write xml files to a mapped drive using the type command. On one of the servers the output is truncated. The other servers copy the entire file, even if it is larger. The file is not truncated at the same location each time.

type D:\serverLogs\log.xml > H:\prod2.xml

I have run a diff on the code to make sure each server is running the same commands. Any ideas what might be stopping the write?

Upvotes: 0

Views: 1732

Answers (1)

Ken White
Ken White

Reputation: 125748

You should be using copy (or xcopy or robocopy) to do this instead of type. There's absolutely no reason to be typing the content and redirecting it over the network. (And the copy method will be much faster, as well.)

Upvotes: 2

Related Questions