wget might have a mode to do that; I normally use rsync to do it.