Download a file from web site file listing

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
obfusc88
Pro Scripter
Posts: 89
Joined: Wed Mar 14, 2007 6:22 pm

Download a file from web site file listing

Post by obfusc88 » Mon Jun 28, 2010 11:55 pm

I want to download a file from a website directory.

I can manually go to the page and see a list of the files.
If I click on the file I am prompted to Open/Save the file. I want to save.
OR If I copy the link for the file to a new browser tab, I am prompted to Save
Both of these work, but I want to do this discretely like HTTPRequest. method.

But the HTTPRequest does not give me the file...
I tried FTPGetFile, but cannot seem to grab the file. I left usrname and password blank, since none is required, it is a public web page.
I have used http://www.websitename.com and ftpwebsitename.com for hostname, used port 80 vs. 21, but still having no success.

Suggestions?
Last edited by obfusc88 on Tue Jun 29, 2010 3:03 am, edited 1 time in total.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Tue Jun 29, 2010 12:10 am

But the HTTPRequest does not give me the file...
Not sure what you mean. HTTPRequest is for retrieving pages (files) on a web server.

If you give the exact URL you are having problems/issues with it might help.

obfusc88
Pro Scripter
Posts: 89
Joined: Wed Mar 14, 2007 6:22 pm

Post by obfusc88 » Tue Jun 29, 2010 2:45 am

I know that HTTP will not work, just mentioned it as an example of a method similar to how I would like to download the file.

Basically using a web site similar to an FTP site, but having users just use their browser vs. ftp software. Not my design, not my site to make public, only to access for downloads and uploads.

Cannot provide link now, although it is public, it is only known to particular users who have been given the path. There are files on the site that have confidential material. (I know, big security issues, again, not my idea). I will check around to see if I can find a similar site or have them create one for test purposes

OK...just found a random link: http://typelogic.com/gallery/modules/sl ... _MESSAGES/
The file "modules_slideshow.mo" is an example.
How to download this file in background without opening browser?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Jun 29, 2010 8:28 am

Not sure why you say HTTP will not work. The link to this file IS an HTTP URL. So this works:

Code: Select all

Let>url=http://typelogic.com/gallery/modules/slideshow/locale/de_DE/LC_MESSAGES/modules_slideshow.mo
HTTPRequest>url,%SCRIPT_DIR%\modules_slideshow.mo,GET,,res
This downloads the file to the same folder as the script.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

obfusc88
Pro Scripter
Posts: 89
Joined: Wed Mar 14, 2007 6:22 pm

Post by obfusc88 » Wed Jun 30, 2010 12:41 am

Will try HTTP again with your format, mtettmar. I tried a few variations, but must have had some incomplete paths? Will let you know.....

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts