curl / Mailing Lists / curl-users / Single Mail


Re: Looping though an IMAP-Folder, batch freezes

From: Nicklas Avén <>
Date: Wed, 6 Mar 2019 13:52:05 +0100


What version of cUrl are you using. There was a change in the handling
of UID with version 7.62.0

You can see the discussion in this email with answers:

and this issue:

I did get lost when handling UID in the old version.

Depending on what version you have and what behavior you expect those
things might trick you.

/Nicklas Avn

On 3/6/19 12:37 PM, Axel Humcke wrote:
> Hi,
> first at all i must say that i am completely new to curl.
> I want to use it as follows:
> - Connect to an IMAP-Folder
> - Loop Through the folder and export every email to a text file.
> Therefor I am creating and running the following .bat-file from an
> MS-Access-Application (VBA) with WshShell.Exec:
> /set Timestamp=2019-03-06_12-15-38_80//
> //for /l %%x in (2, 1, 69) do (//
> //curl --insecure --url "imaps://;UID=%%x"
> --netrc-file [Path-to-file] -o cURL_FetchEmail_%Timestamp%_UID_%%x.txt//
> //move [Source-path]\cURL_FetchEmail_%Timestamp%_UID_%%x.txt
> [Destination-path]//
> //curl --insecure --url "imaps://;UID=%%x"
> --netrc-file [Path-to-file] -X "UID STORE %%x -Flags \Deleted"//
> //)/
> If i start the .bat-file manually from the folder where it is created,
> it runs without problems. But when i start it with VBA it freezes
> after a few loops (The first few textfiles are created).
> There sure is a better way to do this like looping through the
> IMAP-Folder directly with the curl-command or sequence numbers? I
> didn't really get along with the syntax.
> Any help is appreciated.
> Kind regards,
> Axel
> -----------------------------------------------------------
> Unsubscribe:
> Etiquette:

Received on 2019-03-06