Need to clear the contents of a log file(s) which is(are) locked by a process already from command prompt. When I tried doing
echo "" > filename
I get a error saying, the file is locked by a process.
I couldn't even open the file in notepad, clear contents and save.
Currently I'm opening the file in notepad++ and quickly pressing CTRL + a,CTRL+x,CTRL+s :)
Is there a way to get this done from cmd? How is notepad++ able to handle edit and save while notepad is not able to?