# What happened with the file?

What happened with this file?

infile = "\\test data.txt";

outstr = OpenWrite[infile];
Close[instr];


All content of "test data.txt" was lost.

• You should have used OpenAppend. – Mr.Wizard Mar 22 '13 at 16:52

From the help

OpenWrite["file"] open an output stream to a file, wiping out the previous contents of the file

... it's gone, you deleted it :