curl-users
Keeping a curl comand result in a file, do not work from script
Date: Sun, 29 May 2011 19:24:56 +0200
Hi,
I am working in a VBS script in which one of the task is to connect to a ftp
server, get the list of the files and keep this info in an local ouput file.
It is very strange because it works from command line but it does not from
my script.
This is the code:
Dim oShell
Dim returnResult
Set oShell = WScript.CreateObject ("WScript.Shell")
returnResult = oShell.run("curl -l ftp://user:password@IP:21/test
>>d:\tmp.txt, 1,True)
Set oShell = Nothing
msgbox returnResult
It shows me in the display the list of files but it doesn´t create the file.
The result is a Error code 6:
curl: (6) Could not resolve host: >>; No data record of requested type
However, if I copy/paste the same line "Curl -l ftp://user:password@IP:21/test
>>d:\tmp.txt" in command line, it works and it creates the file!
At the begining I thought that the problem was in my script, but if I try
the same thing with a comand line tool like "ping" it works from my script,
so it creates the file!!!
Could you please help me! I am not sure if the problem is in Curl or in my
Script.
Cheers
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-29