Use FileTruncate utility to truncate content of an existing file to 0 bytes without deleting the file. This can be used if a file is in use, but still writable.

DownloadDownload FileTruncate.exe (16 KB).

Here is the help screen containing complete description and example

Usage: FileTruncate file_name

Command line parameters:

file_name  -     Name of the file that will be emptied.

Run FileTruncate.exe without parameters from the DOS command prompt to see full description of the supported parameters.
For example, FileTruncate myfile.txt will empty myfile.txt.