Csv file problem

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
trinity
Posts: 1
Joined: 26 Dec 2013 02:08

Csv file problem

#1 Post by trinity » 26 Dec 2013 02:23

dear experts

recently i enconter probelm with parse csv file

for /f "usebackq tokens=1* delims=," %%A in ("%FILE%") do (
echo %%A
echo %%B
echo %%C
)


this is my file sample

"1", "x,y,z"
"2", "abc"

the problem is the file has comma inside quote. how to solve.
thnk you

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Csv file problem

#2 Post by foxidrive » 26 Dec 2013 03:06

What is the problem with your output, ignoring that you don't have a token for %%C

What do you expect to get?

Post Reply