AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to download files from a website all at once?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Benny-D



Joined: 29 Feb 2008
Posts: 87

PostPosted: Wed Apr 23, 2008 12:51 am    Post subject: How to download files from a website all at once? Reply with quote

There is one good website, that shares some small files (not more than 300 KB) of different types free. I often copy some files from that website. For each file there is a link provided to download that file.

But the problem is that there are so many files there that I want to copy! It's quite a hassle to go to different download links and copy those small files one by one.

What If I gather all the download links into one text file or so, will it be somehow possible to copy all the files at once?
Back to top
View user's profile Send private message
Benny-D



Joined: 29 Feb 2008
Posts: 87

PostPosted: Wed Apr 23, 2008 6:38 am    Post subject: Reply with quote

I want to add something here:

By saying "all at once" I mean "without a need to click on each download link" I do realize that probably I will need to download files one by one, but I want to start this whole process by only one click - on the first download link. Thus, if the first file is finished downloading I don't need to click on the second download link. Is there such a way to automatically download all thechosen files from a website?
Thank You
Back to top
View user's profile Send private message
_adam
Guest





PostPosted: Wed Apr 23, 2008 7:57 am    Post subject: Reply with quote

most download managers can do this. Internet download manager has a feature called "site grabber", that should do what you need. flashget has something like this if memory serves me right
Back to top
Benny-D



Joined: 29 Feb 2008
Posts: 87

PostPosted: Wed Apr 23, 2008 2:41 pm    Post subject: Reply with quote

Is it possible to be done without a manager? Actually, I can write a script in AHK that would download files from a site one by one according to a list of download links - it's not that hard. But what I really want here is to do it "in invisible way" - without the need of openning windows in my MS Internet Explorer. That's the thing that I don't know how to do. Can anyone here suggest anything, please?
Back to top
View user's profile Send private message
Guest






PostPosted: Wed Apr 23, 2008 3:44 pm    Post subject: Reply with quote

Do you need to enter a captcha (for example, on Rapidshare)? If not, it should be easy enough with a parsing loop and URLDownloadToFile.
Back to top
Benny-D



Joined: 29 Feb 2008
Posts: 87

PostPosted: Wed Apr 23, 2008 3:53 pm    Post subject: Reply with quote

Thank You
Back to top
View user's profile Send private message
_adam
Guest





PostPosted: Wed Apr 23, 2008 5:12 pm    Post subject: Reply with quote

Benny-D wrote:
Thank You


post what you come up with.
Back to top
garry



Joined: 19 Apr 2005
Posts: 987
Location: switzerland

PostPosted: Wed Apr 23, 2008 7:55 pm    Post subject: Reply with quote

here an example downloads 22 small freeware programs (try Q-Dir)
Code:
;-----------------------------------------------------------------------------------
/*
DATE............2006-07-30 garry
MODIFIED........2008-04-23
NAME............urldownloadtest.ahk
USAGE...........extract name from e.g <a href="../Download/ColorConsole.zip"
................http://www.softwareok.com

*/
;------------------------------------------------------------------------------------
F1=%A_SCRIPTDIR%\dnl01.txt
F2=%A_SCRIPTDIR%\dnl02.txt
Filedelete,%F1%
Filedelete,%F2%


URL1=http://www.softwareok.com/?Runterladen         ;extract from this url
urldownloadtofile,%URL1%,%F1%

;-------------------------------------------------
VANAF1=<a href="../                  ;search from
UNTIL1=.zip                          ;search end
ADD1=http://www.softwareok.com       ;add this

stringlen,L1,vanaf1

   Loop,Read,%F1%
      {
      LR=%A_LoopReadLine%
             {
             StringGetPos,VAR1,LR,%VANAF1%
             StringGetPos,VAR2,LR,%UNTIL1%
             VAR1:=(VAR1+L1)
             VAR2:=(VAR2+1)
             VAR3:=(VAR2-VAR1)
             stringmid,ADRESS,LR,VAR1,VAR3
             if adress=
                continue
             K++
             Fileappend,%ADD1%%adress%%UNTIL1%`r`n,%F2%
             }
      }

;----------------- show listview ------------------------------------------------------
KH:
Gui,1:Font,  S10 CDefault , FixedSys
T1=580
Gui,1:Add, ListView,grid y18 20 r23 w600 +hscroll altsubmit vMyListView gMyListView,URL
Gui,1:Add,Text,x20 y2 vTotal1  w100,%I%
    I:=0
    LV_Delete()
    LV_ModifyCol(1,T1)

     Loop,read,%F2%
     {
     I++
     LV_Add("", A_LoopReadLine)
     }

Gui,1:add,button,x10  y430 h25 w100 gStart1,Start
Gui,1:add,button,x120 y430 h25 w100 gBreak1,Break
GuiControl,1:,total1,%I%
Gui,1: Show, x2 y20 w680 h460 ,%NAME%
return
;---------------------------------

MyListView:
GuiControlGet, MyListView
    RN:=LV_GetNext("C")
    RF:=LV_GetNext("F")
    GC:=LV_GetCount()


  If A_GuiEvent = Normal
    {
    return
    }

if A_GuiEvent = DoubleClick
   {
   C1=
   LV_GetText(C1,A_EventInfo,1)
   msgbox,%C1%
   return
   }
return
;-----------------------------------

START1:
K=0
SDL=0
RF:=1
 Loop % LV_GetCount()
 {
        if SDL=1
             {
           RF=
           break
             }

        LV_Modify(RF, "+Select +Focus")
        LV_GetText(C1,RF,1)
        SplitPath,C1,name,dir, ext, name_no_ext, drive
        ifexist,%A_scriptdir%\%name%
             {
             sleep,100
             LV_Modify(RF, "-Select +Focus")
             RF:=(RF+1)
             continue
             }
        urldownloadtofile,%C1%,%name%
        K++
        LV_Modify(RF, "-Select +Focus")
        RF:=(RF+1)

 }
if K>0
msgbox,Download %K% Files finished
else
msgbox,Nothing downloaded
return
;--------------------------------------
BREAK1:
SDL=1
return
;--------------------------------------

Guiclose:
ExitApp
;--------------------------------------
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group