how can i upload files using ahk?

Get help with using AutoHotkey and its commands and hotkeys
canisdibellum
Posts: 45
Joined: 09 Oct 2014, 11:44

how can i upload files using ahk?

09 Oct 2014, 11:54

I've been using ahk as a portable exe at work for a while now...a new task has popped up...I now need to run a compiled script on multiple computers at once (i will be putting it there by copying from thumbdrive) at a certain point in the script i will hook the computers to the internet... As soon as the script detects an internet connection, i need to upload a file from each computer to a central location...

Any ideas how to do this?

I know nothing of ftp at all and since this is at work I cannot install anything at all.

(Please excuse grammar errors, I'm posting this using my phone)
User avatar
6Zptf
Posts: 7
Joined: 18 Sep 2014, 08:03

Re: how can i upload files using ahk?

16 Oct 2014, 07:41

I built an enormous ahk application for a marketing firm a few years ago, primarily focused on ftp uploads. I did so using a class or library that was available on the old autohotkey.com forum. You can try searching for it if you like.

If you haven't solved your issue reply and I'll see if I can dig up that code and get you started.
Last edited by 6Zptf on 18 Oct 2014, 03:26, edited 1 time in total.
Note that my posts are usually in the context of AHK_L on Windows 7 64-bit.
canisdibellum
Posts: 45
Joined: 09 Oct 2014, 11:44

Re: how can i upload files using ahk?

16 Oct 2014, 09:50

Well it turns out the computers i have to fetch from are firewalled somehow against ftp....nothing ive tried has worked even for an attended ftp... Guess i gotta use a thumbdrive :-(
Miguel7
Posts: 176
Joined: 08 Sep 2014, 07:06

Re: how can i upload files using ahk?

16 Oct 2014, 16:28

But just out of curiosity, how does FTP work in AHK? I've done HTTP using a COM object, so is it another COM thing? I searched "ftp" on this site and found a few references (one guy was building an FTP class, which would be great if that works) but I haven't seen anything (yet) with info on how to do basic FTP.
User avatar
6Zptf
Posts: 7
Joined: 18 Sep 2014, 08:03

Re: how can i upload files using ahk?

18 Oct 2014, 03:21

canisdibellum wrote:Well it turns out the computers i have to fetch from are firewalled somehow against ftp....nothing ive tried has worked even for an attended ftp... Guess i gotta use a thumbdrive
That sounds inconvenient. Wish you well with the thumb drives. Maybe there's a less elegant solution for you in automating website uploads and downloads, as in COM+IE.
Miguel7 wrote:But just out of curiosity, how does FTP work in AHK?
There are multiple methods I'm sure. Below is the class I used. I had to do a lot of tinkering and testing, but it sufficed to handle uploading and downloading thousands of files at a time. It uses DllCall to interact with WiniNet, an FTP/HTTP library packaged with Windows. After doing a quick search, this class appears to have been lost along with autohotkey.net, so I am happy to provide it here for anyone who might make use of it:


[Class] FTPv2 - All things FTP.

By Shajul, lost from autohotkey.net. Original forum post here.

Code: [Select all] [Expand] [Download] (FTPv2.ahk)GeSHi © Codebox Plus

Note that my posts are usually in the context of AHK_L on Windows 7 64-bit.
MegaloDon
Posts: 107
Joined: 22 Jul 2014, 17:54

Re: how can i upload files using ahk?

18 Oct 2014, 19:28

Are you in a domain environment? Are all the computers in the same internal network? If so, there may be a much easier way of doing what you need (like using the C$ share).
canisdibellum
Posts: 45
Joined: 09 Oct 2014, 11:44

Re: how can i upload files using ahk?

20 Oct 2014, 08:08

negative, i'm configuring stand alone computers...they are each isolated on the network, except from internet
Peter2
Posts: 218
Joined: 21 Sep 2014, 14:38
Location: CH
Contact:

Re: how can i upload files using ahk?

23 Feb 2017, 05:54

Just for information. These data (from 2011 or 2012) incl. docs can also be found here:

https://github.com/rshipp/ahk-libs/tree/master/FTPv2


Edit: Other download with current code (02/2017):
https://autohotkey.com/boards/viewtopic.php?f=5&t=28482
Peter (AHK Beginner) / Win 7 x64, AHK Version v1.1.22.xx

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 40 guests