Solved batch file to clear txt file

June 23, 2005 at 09:13:40
Specs: Win XP Pro, 1.3 / 256

How can I use a batch file to clear the contents of .txt file without deleting it?

See More: batch file to clear txt file

Report •


✔ Best Answer
June 23, 2005 at 16:56:41

Hi
Sorry that creates a blank line.
Try type nul > file.txt



#1
June 23, 2005 at 09:49:58

Hi

echo. > File.txt


Report •

#2
June 23, 2005 at 09:59:08

but that places either "echo is on" or "echo is off" into the text file. I don't want any text in that file.

Report •

#3
June 23, 2005 at 15:43:46

Hi
did you enter the period after echo.
ECHO. > FILE.TXT

Report •

Related Solutions

#4
June 23, 2005 at 15:57:22

No - thanks that works.

Report •

#5
June 23, 2005 at 16:56:41
✔ Best Answer

Hi
Sorry that creates a blank line.
Try type nul > file.txt


Report •

#6
June 23, 2005 at 23:49:41

or,

@echo on>file

M2


If at first you don't succeed, you're about average.


Report •


Ask Question