[Batch] FIND
Vixage
-
foobar47 Messages postés 13536 Date d'inscription Statut Contributeur Dernière intervention -
foobar47 Messages postés 13536 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Je souhaite rechercher dans un fochier test une chaine de caractères et ensuite testere si elle est présente ou non.
Mais mon script ci dessous ne fonctionne pas car dans mes 2 copies de fichiers se font ( donc la condition n'est pas respectée).
echo off
find "successfully" C:\Temp\Advisor.txt
if ERRORLEVEL=2 goto erreur
if ERRORLEVEL=1 goto noFind
if ERRORLEVEL=0 goto Find
:erreur
COPY C:\Temp\titi.txt C:\
goto fin
:noFind
COPY C:\Temp\toto.txt C:\
goto fin
:Find
COPY C:\Temp\tutu.txt C:\
:fin
Merci pour votre aide,
Vixage
Je souhaite rechercher dans un fochier test une chaine de caractères et ensuite testere si elle est présente ou non.
Mais mon script ci dessous ne fonctionne pas car dans mes 2 copies de fichiers se font ( donc la condition n'est pas respectée).
echo off
find "successfully" C:\Temp\Advisor.txt
if ERRORLEVEL=2 goto erreur
if ERRORLEVEL=1 goto noFind
if ERRORLEVEL=0 goto Find
:erreur
COPY C:\Temp\titi.txt C:\
goto fin
:noFind
COPY C:\Temp\toto.txt C:\
goto fin
:Find
COPY C:\Temp\tutu.txt C:\
:fin
Merci pour votre aide,
Vixage
A voir également:
- [Batch] FIND
- Fichier batch - Guide
- Find and mount - Télécharger - Récupération de données
- Ava find - Télécharger - Divers Utilitaires
- Batch converter - Télécharger - Photo & Graphisme
- Batch renommer une partie du nom de plusieurs fichiers ✓ - Forum Autoit / batch