[BATCH] For & Findstr
Fermé
redploplop
Messages postés
46
Date d'inscription
mardi 6 juillet 2010
Statut
Membre
Dernière intervention
8 septembre 2020
-
13 févr. 2020 à 08:18
dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 - 13 févr. 2020 à 15:32
dubcek Messages postés 18718 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 22 mars 2024 - 13 févr. 2020 à 15:32
A voir également:
- Findstr batch
- Fichier batch - Guide
- Msgbox batch ✓ - Forum Autoit / batch
- Net use batch - Forum Réseau
- Extension batch - Forum Windows
- Batch color - Forum Autoit / batch
1 réponse
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
Modifié le 13 févr. 2020 à 10:39
Modifié le 13 févr. 2020 à 10:39
hello
ok : findstr a trouvé %%G dans le fichier
ok : findstr a trouvé %%G dans le fichier
@echo off setlocal enableDelayedExpansion FOR /l %%G in (1,1,999) do ( findstr /r /c:AP-LPT-%%G$ AP-LPT.txt >NUL if !ERRORLEVEL! EQU 0 ( echo ok %%G ) else ( echo nok %%G ) )
13 févr. 2020 à 14:30
Il y a juste une petite faute /c:AP-LPT-%%G$ est en trop je crois ;)
MERCI !!!
13 févr. 2020 à 15:32
voir help findstr