Outils pour utilisateurs

Outils du site


informatique:windows:for

Ceci est une ancienne révision du document !


for

Affichage d'un champs

Pour afficher field1 field2 field3:

for /F "tokens=1,2,3" %a IN ('echo field1 field2 field3') DO @echo %a %b %c

Pour afficher field1 field2:

for /F "tokens=1,2" %a IN ('echo field1 field2 field3') DO @echo %a %b

Compter le nombre de ligne dans un fichier (^ est un caractère d'échappement à mettre devant |)

for /f %a in ('type get-conf-csv.bat^| find "" /v /c') do set /a cnt=%a
informatique/windows/for.1200042257.txt.gz · Dernière modification: 2018/09/06 18:59 (modification externe)