A voir également:
- Batch/manipulation d'un .txt
- Fichier batch - Guide
- Input batch - Forum Autoit / batch
- Batch supprimer fichier - Forum Windows
- Txt to pdf - Télécharger - PDF
- Msgbox batch ✓ - Forum Autoit / batch
3 réponses
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
17 nov. 2009 à 07:54
17 nov. 2009 à 07:54
hello
C:> aa [pl=uyrrytrrtu] xy {0} [pl=rtuytrutrutru] xy {0} [pl=rtuytruytruyrt] xy {0} [pl=rtuytruytru] xy {0} [pl=truytr] xy {0} C:> type aa.bat @echo off for /f "delims=" %%a in ('type fichier.txt') do ( echo %%a if "%%a" == "xy" (echo {0} echo.) )
dubcek
Messages postés
18718
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
22 mars 2024
5 615
17 nov. 2009 à 09:24
17 nov. 2009 à 09:24
autre méthode, on ne teste que le début de la ligne
@echo off setlocal enableDelayedExpansion for /f "delims=" %%a in ('type fichier.txt') do ( echo %%a echo %%a | findstr "^xy" > NUL if !errorlevel! EQU 0 (echo {0} echo.) )