Bonjour,
J'appelle une fonction par un avec un argument :
Dans ma fonction :FTP_ANALYSE, je parcours mon log pour ne prendre que le premier item de chaque ligne
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 call :FTP_ANALYSE %LOGFTP%
Dans la trace FTP, j'ai mes données :
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 :FTP_ANALYSE setlocal %TRACE% DEB FUNCTON FTP_ANALYSE >> %LOG% set FTP_LOGFTP=%1 set RET= %TRACE% FTP_LOGFTP ^<%FTP_LOGFTP%^> >> %LOG% for /f "tokens=1*" %%a in ('type %LOGFTP%') do ( %TRACE% FTP ^<%%a^> >> %LOG% set RET=%%a %TRACE% RET ^<%ret%^> >> %LOG% ) %TRACE% END FUNCTION FTP_ANALYSE >> %LOG% endlocal goto :EOF
FTP <ftp>>
FTP <open>
etc...
Mais dans RET, je n'ai rien
RET <>
RET <>
etc..
Avez-vous une idée ?
Précisions en tout début de code j'ai un setlocal enableDelayedExpansion.
Le but de ma fonction est d'analyser les codes retour suivant la RFC FTP.
Merci pour votre aide.
Partager