Delete Double-Quotes from Text File

August 13, 2010 at 02:39:02
Specs: Windows XP
I have a basic text file with one line of data - see below for an example

"ETDEOE","200002302","0400050400","IS","03/08/10","09/06/10",

I want to write a Bat File to remove the double-quotes from line 1 so it look like the following

ETDEOE,200002302,0400050400,IS,03/08/10,09/06/10,

Any help would be great


See More: Delete Double-Quotes from Text File

Report •


#1
August 13, 2010 at 03:20:56
Quote=JSomer2000: I have a basic text file with one line of data... I want to write a Bat File to remove the double-quotes from line 1

Do you mean that the file contains just one line from which the double quotes are to be removed - or - does the file have more than one line and the double quotes are to be removed from line 1 only?


Report •

#2
August 13, 2010 at 03:30:45
It only has 1 line of data

Report •

#3
August 13, 2010 at 03:52:55
@echo off > newfile & setLocal enableDELAYedeXpansion

set Q="

for /f "tokens=* delims= " %%a in (myfile) do (
set S=%%a
set S=!S:"=!
>> newfile echo.!S!
)


=====================================
Helping others achieve escape felicity

M2


Report •

Related Solutions

#4
August 13, 2010 at 05:10:42
Thanks

I have put the program above in a bat file and replaced myfile with the path of my text file. Nothing seems to happen.


Report •

#5
August 13, 2010 at 05:41:05
Did you look at newfile in the directory where the batch is?


=====================================
Helping others achieve escape felicity

M2


Report •

#6
August 13, 2010 at 05:54:38
It didn't the file - some what confused now

Report •

#7
August 13, 2010 at 06:14:53
Put the batch and the file to prtocess in an empty directory.


=====================================
Helping others achieve escape felicity

M2


Report •


Ask Question