Reset file size to zero from command line on windows

During my daily work, I work with different kind of log files and time to time I need to reset them to start afresh. I am sharing a small trick by which you can easily reset files size to 0. Although you can delete and recreate to achieve the same results but in later case you will require to re apply permissions or file attributes again.

D:\>echo > logfile.txt

This commend will reset the logfile.txt size to few bytes only.

0 Comments:

Post a Comment