Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8504507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:03:06+00:00 2026-06-11T02:03:06+00:00

I am trying to download a PDF file from a website, I know the

  • 0

I am trying to download a PDF file from a website, I know the name of the file, e.g. foo.pdf, but It’s location changes every few weeks:

e.g.
http://www.server.com/media/123456/foo.pdf
changes into
http://www.server.com/media/245415/foo.pdf

The number is always a six-figure number, so I tried using a bash script to go through all 10 million of them, but that obviously takes a lot of time:

i=0
until [ "$RC" == "0" ] || [ $i == 1000000 ]
do
  b=$(printf %06d $i)
  wget -q http://www.server.com/media/${b}/foo.pdf -O bar.pdf
  export RC=$?
  i=$(($i + 1))
done

For wrong addresses I just get 404 errors.
I tested it around the currently correct address and it works.

Does anyone know a faster way to solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T02:03:07+00:00Added an answer on June 11, 2026 at 2:03 am

    If that page is linked form anywhere else, then you can get the link from there, and just get the file. If it’s not, you are probably out of luck.

    Note that most servers would consider trying to hit the webserver 1,000,000 times abuse, and would ban your IP for even trying.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying out http requests to download a pdf file from google docs using
I am trying to download a file from a website using python and mechanize.
I am trying to download & save a PDF file from an online resource.
I am trying to download a PDF file with HttpClient. I am able to
I am trying to download a pdf file on my mobile (using Java ME
I'm trying to download the XLS file from this page: http://www.nordpoolspot.com/Market-data1/Elspot/Area-Prices/ALL1/Hourly/ (click on Export
I am trying to download documents (pdf, tiff, images) from webpages that have javascript
I am trying to create a PDF file using struts 2.Action class location is
i'm trying to using R and RApache to download pdf file with no success.
I am trying to grab a file .pdf from a server. There is a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.