Computing.Net > Forums > Programming > Code to Remove double quotes

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Code to Remove double quotes

Reply to Message Icon

Name: steve30
Date: March 18, 2009 at 03:45:05 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

Hi,

Could you please give me the code that removes double quotes from .csv file.

The file is stored in C:\Temp location

The size of the file is 32000kb

The code should remove the double quotes very quickly.

Sample contentes of the file is

"1"|"1"|"ABC"|""|"AGA"|""|"MIS"|""|""|"L4"|"36995"|""|""|""|"GAF"|""|""|""|""
"10"|"10"|"FSASDF"|""|"4FSDA, SD."|""|"CFFSD"|""|""|"FAEQW

like this there are 70,000 lines
Thanks




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: March 18, 2009 at 05:40:31 Pacific
Reply:

:: remove double quotes

@echo off & setLocal EnableDelayedExpansion

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


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

M2


0
Reply to Message Icon

Related Posts

See More


BAT Suppress prompting Code to remove old file



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Code to Remove double quotes

Remove quotes from user input string www.computing.net/answers/programming/remove-quotes-from-user-input-string/19410.html

Code to remove old file www.computing.net/answers/programming/code-to-remove-old-file/18270.html

windows script to remove LF and CR characters www.computing.net/answers/programming/windows-script-to-remove-lf-and-cr-characters/18903.html