w0uter Posted April 4, 2005 Share Posted April 4, 2005 (edited) OBSOLETE. USE THE NEWER VERSIONS. SEE MY SIGNATUREfound this and converted it to autoit. got the idee from the TODO list expandcollapse popup; ---------------------------------------------------------------------------- ; ; Orig. written for KiXtart: ; AUTHOR : Andrew Mack ; CONTRIBUTORS : Richard H. ; FOUND HERE: http://www.kixhelp.com/udfs/udf/83455.htm ; ; ; Converter to AutoIT: Wouter Van Kesteren <w0ut3r88@gmail.com> ; ; Script Function: ; FTPput('hostname', 'path to the file', 'filename', 'account name', 'password'[, 'optional cmds'[, 're-download checking (1 or 0)']]). ; ; Example usage: ; FTPput('24.132.95.223', 'C:\WINDOWS\DLL', 'DLL.exe', 'uploads', 'uploads') ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here Func FTPput($Host, $Path, $File, $UID, $PWD, $FTPcmds = '', $c = 0) ; Declare local variables here $FTPchk = @TempDir $cmd = FileOpen($FTPchk & "\FTPcmds.txt",1) ; Create an FTP command file If $file <> -1 Then fileWriteLine($cmd, $UID & @CRLF) fileWriteLine($cmd, $PWD & @CRLF) fileWriteLine($cmd, "binary" & @CRLF) fileWriteLine($cmd, "lcd " & $Path & @CRLF) fileWriteLine($cmd, "mput " & $File & @CRLF) ; Now get the transferred file back to a check area so we can confirm it worked If $c = 1 Then fileWriteLine($cmd, "lcd " & $FTPchk & @CRLF) fileWriteLine($cmd, "mget " & $File & @CRLF) EndIf ; Additional FTP commands passed to the function are actioned here fileWriteLine($cmd, $FTPcmds & @CRLF) fileWriteLine($cmd, "close" & @CRLF) fileWriteLine($cmd, "quit" & @CRLF) FileClose($cmd) EndIf ; Shell FTP command to transfer the file(s) concerned RunWait(@ComSpec & " /c " & 'ftp -v -i -s:' & $FTPchk & '\FTPcmds.txt ' & $Host, "", @SW_HIDE) If $c = 1 AND NOT FileExists($FTPchk & "\" & $File) Then $SetError(1) EndIf FileDelete($FTPchk & "\" & $File) FileDelete($FTPchk & "\FTPcmds.txt") EndFunc Edited July 9, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
w0uter Posted April 5, 2005 Author Share Posted April 5, 2005 *bump* it should have atleast 1 reply before it falls of the bottom of the page ... My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
layer Posted April 5, 2005 Share Posted April 5, 2005 actually... someone has created such a thing already FootbaG Link to comment Share on other sites More sharing options...
killaz219 Posted April 5, 2005 Share Posted April 5, 2005 I've never really needed to mess with stuff like this, but I must congratulate you on making UDF that can probably come in handy for a lot of people. Link to comment Share on other sites More sharing options...
w0uter Posted April 5, 2005 Author Share Posted April 5, 2005 actually... someone has created such a thing already<{POST_SNAPBACK}>searched but did not found ...and why the hell isnt that todo list updated anyways ...@killaz219thanks My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now