how to remove a character from a file

June 22, 2011 at 06:42:49
Specs: Windows XP
Hi, Can you tell me MS dos command to remove a character from a file

See More: how to remove a character from a file

Report •


#1
June 22, 2011 at 15:06:09
Change 0 in the set command line to the char you want to remove.

@echo off>output.txt
cls
setlocal enabledelayedexpansion

for /f "tokens=*" %%1 in (input.txt) do (
    set newline=%%1&set newline=!newline:0=!
    echo !newline!>>output.txt
)




Please come back & tell us if your problem is resolved.


Report •
Related Solutions


Ask Question