w0uter Posted April 7, 2005 Share Posted April 7, 2005 improved _FTPput added _FTPdel and _FTPadv i tested em under a few curcumstances but ofcourse not all so if you find a bug or a peice of code that can be improved tell me ... expandcollapse popup;=================================================================================================== ; ; ; ; Function Name: _FTPput() ; ; ; ; Description: Uploads a file to an ftp server. ; ; ; ; Parameter(s): $s_p_Host - IP or URL to the host. ; ; (ex. '24.158.58.154') ; ; $s_p_PathFile - The path and filename. ; ; (ex. 'C:\windows\notepad.exe') ; ; $s_p_Acc - Account to log into. ; ; (ex. 'Sander') ; ; $s_p_Pwd - Password for the account. ; ; (ex. 'Monkey') ; ; $s_p_Cd - Path where the file should go to on the server. ; ; (ex. 'uploads\scripts') ; ; $i_p_Check - Enable/Disable download checking. ; ; (ex. 1) ; ; $s_p_Aftp - Additional ftp commands that you want exectued. ; ; (Executed before the send) (Separate commands by @CRLF) ; ; (ex. 'bell') ; ; ; ; Requirement(s): None ; ; ; ; Notes: It is possible to send multiple files using wildcards BUT you will ; ; not be able to check if it was successfull by turning $i_p_Check to 1. ; ; ; ; Return Value(s): ($i_p_Check = 0) (Default) ; ; Always Returns 0 ; ; ; ; ($i_p_Check = 1) ; ; On Success - Returns 1 ; ; On Failure - Returns -1 ; ; ; ; Author(s): (KiXtart) (http://www.kixhelp.com/udfs/udf/83455.htm) ; ; Andrew Mack ; ; Richard H. ; ; ; ; (AutoIt) (Re-Written from scratch) ; ; Wouter Van Kesteren <w0ut3r88@gmail.com> ; ; ; ; Example Usage: _FTPput('24.132.95.223', 'C:\WINDOWS\NOTEPAD.EXE', 'uploads', 'fakepass') ; ;=================================================================================================== ; expandcollapse popup;=================================================================================================== ; ; ; ; Function Name: _FTPdel() ; ; ; ; Description: Deletes a file from an ftp server. ; ; ; ; Parameter(s): $s_d_Host - IP or URL to the host. ; ; (ex. '24.158.58.154') ; ; $s_d_PathFile - The path and filename. ; ; (ex. 'uploads\autoitscript.exe') ; ; $s_d_Acc - Account to log into. ; ; (ex. 'rootacc') ; ; $s_d_Pwd - Password for the account. ; ; (ex. 'pass') ; ; $i_d_Check - Enable/Disable download checking. ; ; (ex. 1) ; ; $s_d_Aftp - Additional ftp commands that you want exectued. ; ; (Executed before the send) (Separate commands by @CRLF) ; ; (ex. 'bell') ; ; ; ; Requirement(s): None ; ; ; ; Notes: It is possible to delete multiple files using wildcards BUT you will ; ; not be able to check if it was successfull by turning $i_d_Check to 1. ; ; ; ; Return Value(s): ($i_d_Check = 0) (Default) ; ; Always Returns 0 ; ; ; ; ($i_d_Check = 1) ; ; On Success - Returns 1 ; ; On Failure (B/C the information is incorrect) - Returns -2 ; ; On Failure (Other) - Returns -1 ; ; ; ; Author(s): (KiXtart) (http://www.kixhelp.com/udfs/udf/83455.htm) ; ; Andrew Mack ; ; Richard H. ; ; ; ; (AutoIt) (Re-Written from scratch) ; ; Wouter Van Kesteren <w0ut3r88@gmail.com> ; ; ; ; Example Usage: _FTPdel('24.132.95.223', 'uploads\autoitscript.exe', 'rootacc', 'pass', 1) ; ;=================================================================================================== ; ;=================================================================================================== ; ; ; ; Function Name: _FTPadv() ; ; ; ; Description: Sends FTP commands to an ftp server. ; ; ; ; Parameter(s): $s_a_Host - IP or URL to the host. ; ; (ex. '24.158.58.154') ; ; $s_a_Acc - Account to log into. ; ; (ex. 'Sander') ; ; $s_a_Pwd - Password for the account. ; ; (ex. 'Monkey') ; ; $s_a_Ftp - FTP commands that you want exectued. ; ; (Separate commands by @CRLF) ; ; (ex. 'rename ' & $filename & $newfilename) ; ; ; ; Requirement(s): None ; ; ; ; Return Value(s): None ; ; ; ; Author(s): (KiXtart) (http://www.kixhelp.com/udfs/udf/83455.htm) ; ; Andrew Mack ; ; Richard H. ; ; ; ; (AutoIt) (Re-Written from scratch) ; ; Wouter Van Kesteren <w0ut3r88@gmail.com> ; ; ; ; Example Usage: _FTPadv('24.132.95.223', 'upload', 'pass', 'rename ' & $filename & $newfilename); ;=================================================================================================== ;_FTPxxx.au3 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...
Insolence Posted April 7, 2005 Share Posted April 7, 2005 Very well documented, I was searching for something like this a while ago. Thank you "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
w0uter Posted April 7, 2005 Author Share Posted April 7, 2005 Thank you <{POST_SNAPBACK}>no thank you 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...
Ghastly_MIB Posted April 15, 2005 Share Posted April 15, 2005 Does anyone know how this works? Link to comment Share on other sites More sharing options...
Insolence Posted April 15, 2005 Share Posted April 15, 2005 What don't you understand? "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
YpR^ Posted April 15, 2005 Share Posted April 15, 2005 Uhm.. i get this error: Badly formatted "Func" statement. I copied ur example and edited it :/ Link to comment Share on other sites More sharing options...
w0uter Posted April 15, 2005 Author Share Posted April 15, 2005 thats what you get for messing w/ my code... post your modified code here and we will have a look at it 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...
mads3n Posted June 9, 2005 Share Posted June 9, 2005 When I use _FTPput on one of my .txt files it changes the content of the file to an error message.. :S Mads3n.dk 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