Zoony Posted December 26, 2006 Posted December 26, 2006 Alright, I've been using AutoIt for a little while now and I've come to a situation where it'd save me a lot of time if I could upload files to say an FTP server, or if I can upload files elsewhere (or even have someone download them off me like peer-to-peer). Is it possible? I haven't found anything in the help about uploading, if there's a way please tell me.
Thatsgreat2345 Posted December 27, 2006 Posted December 27, 2006 Theres an FTP UDF available in the example scripts.
Zoony Posted December 27, 2006 Author Posted December 27, 2006 Can you please tell me where? I'm looking at FTP and UDP and TCP and I see nothing.
Thatsgreat2345 Posted December 27, 2006 Posted December 27, 2006 I don't know typing FTP into the search and choosing the 5th result was awfully hard...http://www.autoitscript.com/forum/index.php?showtopic=12473
Zoony Posted December 27, 2006 Author Posted December 27, 2006 Thanks! That partially works. It's all fine for txt files and xml files, but when I tried uploading any images or any other type of file it would always fail. So I can only upload text files? I really need to upload different files too. What can I do?
Thatsgreat2345 Posted December 27, 2006 Posted December 27, 2006 No it works for all files the example given uses a .exe file $server = 'ftp.example.com' $username = 'secretusers' $pass = 'hiddenpass' $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass) $Ftpp = _FtpPutFile($Conn, 'C:\WINDOWS\Notepad.exe', '/somedir/Example.exe') $Ftpc = _FTPClose($Open) for the Put file its the connection, the location of the file ur going to upload , and then where you want to put the file in the ftp directory
Zoony Posted December 27, 2006 Author Posted December 27, 2006 (edited) Yes I understood the demo (although I didn't actually run that), I set the second argument as a text file (local) and I set to where I wanted to save it and it worked. But if I try that with an image, or with any other file type (possibly even exe, I'll check now) it'll return 0.Edit: Yep, exes don't work either. Only two file types I've gotten to work (and keep working) are XML and HTML files. I'm guessing all text files work fine, but why doesn't any other file upload? Edited December 27, 2006 by Zoony
Thatsgreat2345 Posted December 27, 2006 Posted December 27, 2006 does your system allow those types of files, did you give it time to completely upload?
Zoony Posted December 27, 2006 Author Posted December 27, 2006 Yep. I'm sure I let them completely upload (I check when a download is finished), and yeah my Windows system can run exes and bmps. I really don't understand why it won't work, but if I describe my situation maybe you could refer me to a script someone wrote that does what I need. Right now I have a computer sitting at my friend's house (has no monitor or anything, just a standalone computer with a keyboard) which is just saving some files for me (yeah, it's like a really terrible back-up drive). I want to be able to browse through that computer and upload any files that I want (I'm achieving this by uploading the files via FTP to a server, I'm not sure if you can do peer-to-peer). I wrote a pretty crappy AutoIt script to do it. The GUI is nasty and all but it semi-works. If there's a program like this that someone has already written then could you please link me to it? I looked up that Remote Administration program but the download links were broken. Thanks.
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