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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy command is corrupting file

Status
Not open for further replies.

douggy

Technical User
Jan 18, 2001
78
GB
Hi there,

I have a windows copy command setup as a scheduled batch file. It takes one xml file (a text file) and overwrites one of the same name in a different folder. It has been working fine and all of a sudden it still seems to perform the overwrite but the new file ends up being truncated with the closing lines/tags missing? When you look at the original file that is being copied all is in tact. So its the copy operation that seems to be corrupting the file.

Any ideas??

Thanks
Mark
 
How is this a Microsoft Office problem? Wouldn't you be better off posting in a Windows forum?

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Hi, Mark

I assume you are using the COPY command?
Try using the /B option in order to copy binary files.

Alternatively, take a look at the XCOPY command.

In either case, the /? option will give you documentation at a command prompt.

Jock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top