Bonjour tout le monde,

Je récupère la valeur de la variable système %ERRORLEVEL% et j'aimerais la retrouver dans un journal d'exécution. J'ai essayé le code suivant, sans succès.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@ECHO

SET REP_LOG=C:\USERS\SUADEO\DESKTOP\APICIL\TRMAJADMIN\RC_BATCH\LOG\

SET NOM_LOG=%REP_LOG%LOG.LOG

MD C:\USERS\SUADEO\DESKTOP\APICIL\TRMAJADMIN\RC_BATC\NEW_REP

SET RC=%ERRORLEVEL%

IF RC=1 GOTO ERREUR_CREATION_NEW_REP

:SORTIE

EXIT

ERREUR_CREATION_NEW_REP: ECHO ERREUR DU BATCH >%NOM_LOG%

EXIT
Merci de votre aide.

ash_rmy.