Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting several files from Web
#5
Macro Macro20
Code:
Copy      Help
;allow single instance
if(getopt(nthreads)>1) end "The thread is already running. You can end it in the 'Running items' pane."
;create folder for files
str folder="$desktop$\test643"
mkdir folder

;Add up to 87 links as you like.
str s=
;http://www.quickmacros.com/download.html
;http://www.quickmacros.com/support.html

int downloaded index=1
str line sf sd timef;;variables
foreach line s
,rep 60
,,IntGetFile line sd
,,err 10; continue ;;if error, retry after 10 s
,,downloaded=1
,,break
,if(!downloaded) end "failed to download"

,;format filename and save to file
,timef.timeformat("{yyyy-MM-dd}")
,_s.from(folder "\" "File" index "-" timef)
,sd.setfile(_s)
,index+1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)