How to delete content from a text file using windows batch script

前端 未结 5 1981
星月不相逢
星月不相逢 2020-12-28 13:03

I have a demo.txt file. I need to delete content in that file using a batch file. Please tell me the command to delete content for demo.txt file.

5条回答
  •  臣服心动
    2020-12-28 13:26

    Command Prompt:

    1. break>c:\'file directory'\demo.txt

    PowerShell:

    1. Clear-Content c:\'file directory'\demo.txt

提交回复
热议问题