curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Curl output file not created when used with external tool

From: Hemant Tank via curl-users <curl-users_at_cool.haxx.se>
Date: Tue, 7 Jan 2020 13:47:57 +0530

Thank you for your reply, yes we verified many such scenarios, it wasn't
related path accessibiliy. Here's the workaround -

There was nothing to be rectified in curl command options, we suspect that
our mapping tool was somehow preventing the console output all together
(thus the output file might also have not been created because no output
was allowed).

To overcome the limitation, we resorted to *wrap the curl command within a
batch (.bat) file*. And made sure that neither curl nor the batch file
produce any output on console. Using curl's --silent option and quietly
redirecting the output to a file using -o (which we wanted). And it worked!

Somehow, the curl command execution within the batch file wasn't disturbed
by our mapping tool and it allowed the creation of the response output
file. Patchy as it sounds, but it worked.

You can refer / respond to this SO post
<https://stackoverflow.com/questions/59583151/curl-output-file-not-created>
directly.

Regards.

On Tue, Jan 7, 2020 at 3:28 AM Norton, Mike <mikenorton_at_pwsd76.ab.ca> wrote:

> > This command works fine from command line (both output and trace files
> are produced).
> > But when we execute the exact same command from our mapping tool it is
> not producing the output file (the Trace file does get updated
> successfully). Curl is able to read the request data file and it also
> produces the trace file. But for some reason the output file is NOT
> generated.
>
> I notice your input file is in the “PUTOR23” folder and also the trace
> file gets created in the “PUTOR23” folder, but the output file which failed
> to get created was supposed to go in the “PUTOR23\Output” folder. So first
> thing I would suspect is that something could be different between these
> two folders.
>
> I would check to make sure that the Windows account your mapping tool runs
> as (and/or the account it runs external commands as, which I suppose could
> be different) has suitable permissions on the “PUTOR23\Output” folder.
>
> -mn
>
>

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-01-07