Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i would like to download a file from dropbox every hour and log it for testing. whats the best way to this?

im new to wget and so far iv manage to download the file. here is what i have so far:

wget -o download.txt --no-check-cert LINK

could anyone give me any advice on how to this? will the download.txt file be overwritten everytime it redownloads?


share|improve this question
Which operating system? – Daniel Andersson Mar 8 '13 at 16:52
If you are using linux, try crontab – agz Mar 8 '13 at 16:56

wget --help says

  -o,  --output-file=FILE    log messages to FILE.
  -a,  --append-output=FILE  append messages to FILE.
  -d,  --debug               print lots of debugging information.
  -q,  --quiet               quiet (no output).
  -v,  --verbose             be verbose (this is the default).
  -nv, --no-verbose          turn off verboseness, without being quiet.
  -O,  --output-document=FILE    write documents to FILE.

so you have to use the -a switch to append to the log file instead of overwriting it.

To make Wget produce more or less verbose output, you can use the switches -d and -nv, respectively. -O nul discards the downloaded file.


wget -O nul -nv -a log.txt --no-check-cert

To do this once per hour, you can use this batch file:

@echo off
wget -O nul -nv -a log.txt --no-check-cert
choice /C y /D y /T 3600 > nul
goto start

The choice command is a (hacky) way to delay the next command for an hour.

If you want to run the batch script in the background, you can use Bat To Exe Converter and choose Invisible application.

share|improve this answer
sorry the download.txt is where the log is going to be saved. i would like to download the file every hour and log it, im trying it on windows but may be able to try in ubuntu. below is the file im trying to download wget -O download.jpg --no-check-cert uhouuxtpav6mo4/Boston%20City%20Flow.jpg – user205403 Mar 8 '13 at 17:19
Ah, OK. Do you need the file as well? – Dennis Mar 8 '13 at 17:27
no just to show that they've been downloaded. so i dont mind if they are deleted. – user205403 Mar 8 '13 at 17:54
I've edit my answer. – Dennis Mar 8 '13 at 18:04
Is there a restriction with regards to repeating the process? Why not use Task Scheduler instead of choice? – Karan Mar 10 '13 at 0:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .