How To Use a For In File Loop With Quotes?

January 18, 2011 at 13:07:03
Specs: Windows XP
This just outputs the file path:

@echo off
for /f "tokens=* delims=" %%a in (%1) do echo %%a >> File.txt


See More: How To Use a For In File Loop With Quotes?

Report •


#1
January 18, 2011 at 16:35:52
Hi alester27

I take it you want to echo the data in %1 to File.txt
if so this help

@echo off
for /f "tokens=* delims=" %%a in ('type %1') do echo %%a >> File.txt


Report •

#2
January 18, 2011 at 16:54:02
@echo off
for /f "usebackq tokens=* delims=" %%a in (%1) do echo %%a >> File.txt

How To Ask Questions The Smart Way


Report •

#3
January 19, 2011 at 14:32:11
Thanks Guys. It Works Perfectly.

Report •
Related Solutions


Ask Question