[DOS] Catturare l'errore di un comando FTP

di Anonimizzato8705 il
3 risposte
Ciao,
esiste un modo per recuperare l'errore di un comando FTP all'interno di un .bat?
L' %ERRORLEVEL% viene valorizzato sempre con 0 anche in caso di errore...

FTP -v -s:script.txt

script.txt:
Open serverftp
User
Password

Grazie

3 Risposte

  • Purtroppo ancora non ho risolto...
    @ixamit:

    "Solutions

    Using the DOS FTP application within a DOS batch file, make sure you do the following:

    1. Load the FTP command with the -X option. This options states that if FTP fails, it will exit and return DOS errorlevel 1.

    2. The two DOS errorlevels are 0 and 1. 0 if it works, and 1 if it fails."

    Avresti un esempio, per favore?

    grazie in anticipo
Devi accedere o registrarti per scrivere nel forum
3 risposte