Zoeken in Support

Vermijd ondersteuningsscams. We zullen u nooit vragen een telefoonnummer te bellen, er een sms naar te sturen of persoonlijke gegevens te delen. Meld verdachte activiteit met de optie ‘Misbruik melden’.

Meer info

Deze conversatie is gearchiveerd. Stel een nieuwe vraag als u hulp nodig hebt.

Get the Latest .mar File from the Directory Programatically

  • 3 antwoorden
  • 1 heeft dit probleem
  • 19 weergaven
  • Laatste antwoord van cor-el

more options

0 down vote favorite I am trying to get a file from a given URL. Link to the URL

Basically, what I am looking for is the file with the latest version ending with ...complete.mar

In this case, it will be firefox-40.0.2.complete.mar

I would like to get a path of this file so I can use it somewhere. Cannot hard code the path because file name would change when Firefox updates to a new version.

OR------- I don't if it would work. ...complete.mar also seems to be the last file in the directory. Not sure if it's always the case.

If that's the case, how can I grab the path of the last file in that directory?

0 down vote favorite I am trying to get a file from a given URL. Link to the URL Basically, what I am looking for is the file with the latest version ending with ...complete.mar In this case, it will be firefox-40.0.2.complete.mar I would like to get a path of this file so I can use it somewhere. Cannot hard code the path because file name would change when Firefox updates to a new version. OR------- I don't if it would work. ...complete.mar also seems to be the last file in the directory. Not sure if it's always the case. If that's the case, how can I grab the path of the last file in that directory?

Alle antwoorden (3)

more options
more options
cor-el said

Yea, I know the link. Since, push of Firefox updates will change the fire name.

I am looking to find a way to find the latest name progamtically so I don't have to manually write the file name every time. Instead, the script will automatically look for the latest file, and run the update.

more options

I assume that you would have the check the latest version on the 'all' versions page and use that information to generate the correct link.