|
Hello everybody! I feel a bit stupid about my question because I didnīt understand all the $ @ etc. in the script. So two questions: Where I can learn about the very basicīs like paraterdefinitions syntax etc...? Second: Why do I get "error in parameterdefinition of ftpget" when I use this code:
;-------Start--------- Function FTPget("ftp.sonnenwaermeag.de/test.txt","c:\daten","user","password") Dim $oFTP, $oStream $sUser=""+$sUser $oFTP = CreateObject("Microsoft.XMLHTTP") if @error $ftpget=1 exit 1 endif $oStream = CreateObject("ADODB.Stream") if @error $ftpget=2 exit 2 endif if $sUser $oFTP.Open("GET", $sURL, not 1, $sUser, $sPass) else $oFTP.Open("GET", $sURL, not 1) endif if @error $ftpget=3 exit 3 endif $oFTP.Send $oStream.Type = 1 $oStream.Mode = 3 $oStream.open $oStream.Write($oFTP.responseBody) if @error $ftpget=4 exit 4 endif $oStream.SaveToFile($sTargetFile, 2) if @error $ftpget=5 exit 5 endif $oStream.Close EndFunction ;-------Stop----------
Thank You!
|