cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: detect if an upload/download is finished or failed

From: Sebastien WILLEMIJNS <vivil_at_alinto.com>
Date: Sat, 10 Jan 2004 15:53:21 +0100

On Tue, 30 Dec 2003, Sebastien WILLEMIJNS wrote:

>> i'm only want to know if tranferts fails or not

> Use the exit code as Kevin showed.

FYI, i have found a batch program who show errorlevel code on win9x,
it's errlvlp.zip who is available on FILELIBRARY ;)

when i want someone, i'll give you ;) but it was VERY hard to find it

=======================================
SET N=
curl http://non-existant-domain.com/index.php
FOR %%A IN (0 1) DO IF ERRORLEVEL %%A00 SET N=%%A
FOR %%A IN (0 1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %N%%%A0 SET N=%N%%%A
FOR %%A IN (0 1 2 3 4) DO IF ERRORLEVEL 2%%A0 SET N=2%%A
FOR %%A IN (0 1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %N%%%A SET N=%N%%%A
FOR %%A IN (0 1 2 3 4) DO IF ERRORLEVEL 25%%A SET N=25%%A
ECHO.
ECHO ERRORLEVEL IS %N%
==========================

-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
Received on 2004-01-11