dos-batch-remove-characters-from-string-in-a-for-loop
@echo off </br>
setlocal enabledelayedexpansion </br>
for /f "delims=" %%a in (file.txt) do ( </br>
set str=%%a </br>
set str=!str: =! </br>
set str=!str:"=! </br>
echo !str! </br>
)
@echo off </br>
setlocal enabledelayedexpansion </br>
(for /f "delims=" %%a in (file.txt) do ( </br>
set str=%%a </br>
set str=!str: =! </br>
set str=!str:"=! </br>
echo !str! </br>
)) >output.txt </br>
Written by Mike
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Cmd
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#