Solved Why does a command run in a shell but not in a bat file?

October 14, 2016 at 11:04:51
Specs: Windows 7
I am running this batch file (NOT command line):

For /F “tokens=5 delims=,” %%i in (xom1.csv) do @echo.%%i>> "xom2.csv"

and I get this:

5 unexpected.

My CSVfile has 6 columns I need to extract 5. Please help! Thanks.


See More: Why does a command run in a shell but not in a bat file?

Reply ↓  Report •


#1
October 14, 2016 at 13:12:30
✔ Best Answer
Redo the quotes around tokens=5 delims=, and make sure they're straight quotes like you see on your xom2.csv.

How To Ask Questions The Smart Way


Reply ↓  Report •

#2
October 15, 2016 at 07:44:55
Thanks much, it worked!

Reply ↓  Report •

Related Solutions


Ask Question