in a batch file you could use "cat /dev/null > test.txt" It will give you an error, but will clear it out. I seem to remember there is a way to do this with standard DOS commands, but I can't remember. \:\)