Sign in to follow this  
Followers 0
Zoony

Uploading Files

9 posts in this topic

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.

Share this post


Link to post
Share on other sites



Theres an FTP UDF available in the example scripts.

Share this post


Link to post
Share on other sites

Can you please tell me where? I'm looking at FTP and UDP and TCP and I see nothing.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (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? :P

Edited by Zoony

Share this post


Link to post
Share on other sites

does your system allow those types of files, did you give it time to completely upload?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0