dimanche 4 décembre 2016

batch - refer to CSV and have an if statement check against for target text

I have a simple batch where it echos each cell from a CSV file. I would like to have an 'IF' statement to check if current cell value is one I need.

so far I have...

@echo off

for /f "usebackq tokens=1-4 delims=," %%a in ("C:\Users\Name\New folder\Test.csv") do (

echo "%%a" if %%a="computer123" echo "We need you"

pause

Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire