LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Wget "cannot write to"/ "filename too long" problem (https://www.linuxquestions.org/questions/linux-newbie-8/wget-cannot-write-to-filename-too-long-problem-4175424402/)

sybrenkooistra 08-28-2012 09:02 AM

Wget "cannot write to"/ "filename too long" problem
 
First of all - Hi. After hours of not getting any further with this, I figured it was time to join a forum ;)

I'm using wget to download files from a website, and while it works fine for short urls, I get the "file name too long" and "cannot write to '/.." errors.

How does one go about to work around this?

The code/url in question is wget --recursive -A.odt --no-parent --no-check-certificate -nd -P/poging "https://zoek.officielebekendmakingen.nl/zoeken/resultaat/?zkt=Uitgebreid&pst=ParlementaireDocumenten&dpr=AnderePeriode&spd=20100617&epd=20100617&kmr=TweedeKa merderStatenGeneraal&sdt=KenmerkendeDatum&par=Aanhangsel+van+de+Handelingen|Kamervragen+zonder+antwo ord&dst=Onopgemaakt|Opgemaakt|Opgemaakt+na+onopgemaakt&isp=true&pnr=1&rpp=10"

My job sorta depends on me getting this done, so any help is much appreciated :hattip:

acid_kewpie 08-28-2012 09:15 AM

just give it a file name to write to with the -o option (or -O, can't remember which offhand... check the manpage)

sybrenkooistra 08-28-2012 09:26 AM

That might work, however, I want to (need to) download multiple files..

sybrenkooistra 08-29-2012 04:37 AM

I have now tried saving it as an extension via code wget --recursive --tries=40 --accept.xml --no-parent -nd -P/poging -O short_name.ext "https://zoek.officielebekendmakingen.nl/zoeken/resultaat/?zkt=Uitgebreid&pst=ParlementaireDocumenten&dpr=AnderePeriode&spd=20100617&epd=20100617&kmr=TweedeKa merderStatenGeneraal&sdt=KenmerkendeDatum&par=Aanhangsel+van+de+Handelingen|Kamervragen+zonder+antwo ord&dst=Onopgemaakt|Opgemaakt|Opgemaakt+na+onopgemaakt&isp=true&pnr=1&rpp=10"


However this still does not really solve the problem, as the extension has become one long file, where I need a collection of files.. Is there a way, perhaps, to save it as an extension that allows for all the files to be unpacked/abstracted from it?

P.s. Why is it that even when I use the accept list I still get other links?

Mr. Alex 08-29-2012 06:06 AM

sybrenkooistra, we have a "code" tag to post code, OK? Not the italic font.

sybrenkooistra 09-03-2012 08:27 AM

Sorry mr. Alex, I'm still new. I'll use the code tage from now on.

smeezekitty 09-03-2012 09:53 PM

You might be best off writing a script that does it recursively.


All times are GMT -5. The time now is 01:55 AM.