vivec45 Posted May 17, 2008 Share Posted May 17, 2008 Could somebody make me up a simple script that uploads a file to ftp, the name of the file being $filename (defined earliar in the script)... Thanks, Vivec45 Link to comment Share on other sites More sharing options...
d4rk Posted May 17, 2008 Share Posted May 17, 2008 First,go to the example forum and download FTP.au3 and this's an example #include <FTP.au3> DllOpen('wininet.dll') $server = 'ftp.host.com' $username = 'username' $pass = 'password' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'E:\AutoIt Project\d4rklog.txt', '/d4rklog.txt') $Ftpc = _FTPClose($Open) [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
vivec45 Posted May 18, 2008 Author Share Posted May 18, 2008 (edited) Could somebody make me up a simple script that uploads a file to ftp, the name of the file being $filename (defined earliar in the script)... Thanks, Vivec45This does not seem to be working for me..";Ftp upload#include <FTP.au3>DllOpen('wininet.dll')$server = 'myinfo'$username = 'myinfo'$pass = 'myinfo'$Open = _FTPOpen('MyFTP Control')$Conn = _FTPConnect($Open, $server, $username, $pass)$Ftpp = _FtpPutFile($Conn, "/"&$filename, "/"&$filename)$Ftpc = _FTPClose($Open);End Ftp upload"The script runs fine, but the file does not appear on the ftp server! Edited May 18, 2008 by vivec45 Link to comment Share on other sites More sharing options...
d4rk Posted May 18, 2008 Share Posted May 18, 2008 yes, it's surely won't work $Ftpp = _FtpPutFile($Conn, "\" & $filename, "/" & $filename) [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
martin Posted May 18, 2008 Share Posted May 18, 2008 yes, it's surely won't work $Ftpp = _FtpPutFile($Conn, "\" & $filename, "/" & $filename)I'd be surprised if that made any difference. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
vivec45 Posted May 18, 2008 Author Share Posted May 18, 2008 I'd be surprised if that made any difference.So what's wrong with it? Link to comment Share on other sites More sharing options...
Developers Jos Posted May 18, 2008 Developers Share Posted May 18, 2008 So what's wrong with it?How about starting to add some error checking for each statement so you know where things go wrong.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
d4rk Posted May 18, 2008 Share Posted May 18, 2008 Isn't the "/" <> "\" make the difference ?? My uploaded code work very well if "\" and "/" isn't the problem, so his host may does not support FTP, wrong Username || Password , etc... [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
vivec45 Posted May 18, 2008 Author Share Posted May 18, 2008 Isn't the "/" <> "\" make the difference ??My uploaded code work very wellif "\" and "/" isn't the problem, so his host may does not support FTP, wrong Username || Password , etc...I am able to log into my ftp server and upload the file manually, but the script will not.. 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