double quote (") in delims list !!!

Posted on 2003-03-28
Medium Priority
Last Modified: 2012-05-04
I want to parse a file and use the double quote (") as a delimiter...but I cannot
use the line like :

FOR /F  "eol=; tokens=1* delims=""

because the options are already between double quotes and this is causing a syntax error !

How can I manage that ??

Thanks in advance for your help.

Question by:ggz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 11

Expert Comment

ID: 8226685
I think you can use double quote:
for /F  " eol=; tokens=1* delims="" "
LVL 30

Accepted Solution

SteveGTR earned 200 total points
ID: 8227061
I couldn't get the for statement to accept the double quote. I tried a number of things including escaping it (^") and using double quotes (""). Neither worked, but you might consider this:

@echo off

for /F "delims=" %%f in (test.dat) do (
  set lineinfo=%%f
  call :PROCESS

set lineinfo=

goto EXIT


set test=%lineinfo:"=*%

REM ** Here is where you'd do your processing
for /F "eol=; tokens=1,* delims=*" %%f in ('echo %test%') do echo %%f %%g

set test=


You can transform the double quote to another character. I used an asterick.

Good Luck,

Author Comment

ID: 8227464
Many thanks Steve, your solution is working :-D

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question