-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nichlas wrote:
> Hi, i'm new to the list.
> 
> I'm currently trying to download about 600 pdf's linked to from
> individual HTML pages on a site.
> 
> Problem is, that when the PDFs get downloaded, they get names like
> 
> "B111009.pdf?rguid=C26A0D99-F4AB-4C2B-B918-F94B51EE7C3C&rnr=20053"
> 
> Is there any way to get wget to save them just as "B111009.pdf?"

Not really. You can, of course, rename them after the fact. A
Bourne-style shell script to do this might be:

  for f in *.pdf\?*
  do
    newfname="$(echo $f | sed 's/\(\.pdf\).*$/\1/')"
    (
      set -x
      mv "$f"
    )
  done

It's possible that the server sends Content-Disposition headers for
these files, suggesting a cleaner name for them. In that case, you might
consider downloading the latest development version of Wget
(http://wget.addictivecode.org/FrequentlyAskedQuestions#download), and
using the --content-disposition option.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHh7xe7M8hyUobTrERAmsOAJ4215V6wLowEQkfsKPy0lDfZKV4+ACbBFCO
G6njxqHrN8nt07tROThYnBk=
=sRMn
-----END PGP SIGNATURE-----

Reply via email to