Re: Cannot write to auto-generated file name

2007-04-03 Thread Steven M. Schweda
>From Tony Lewis:

> In which case, wget should do something reasonable (generate an error
> message, truncate the file name, etc.).  [...]

   Sadly, this is easier said than done.  Around here (VMS), the
complaint is "i/o error".  I haven't tried it on a UNIX, but it could
easily be different there, too.  VMS offers a ayatem service which can
be used to parse a file specification and test it for legality, but I
don't know how you would do it elsewhere.  On some Linux system(s),
there seems to be a distictive code/message ("File name too long"):

  http://www.mail-archive.com/wget@sunsite.dk/msg09711.html

   Simply truncating the name would be asking for collisions, and "etc."
would seem to involve actual work, especially when converting links to
local.



   Steven M. Schweda   [EMAIL PROTECTED]
   382 South Warwick Street(+1) 651-699-9818
   Saint Paul  MN  55105-2547


RE: Cannot write to auto-generated file name

2007-04-03 Thread Tony Lewis
Vitaly Lomov wrote:

> It's a file system issue on windows: file path length is limited to
> 259 chars.

In which case, wget should do something reasonable (generate an error
message, truncate the file name, etc.). It shouldn't be left as exercise for
the user to figure out that the automatically generated name cannot be used
by the OS. (My vote is to truncate the name, but it's a lot easier to
generate an error message.)

Tony



Re: Cannot write to auto-generated file name

2007-04-03 Thread Vitaly Lomov

It's a file system issue on windows: file path length is limited to 259 chars.
http://support.microsoft.com/kb/148754


Re: Cannot write to auto-generated file name

2007-04-02 Thread Alan Thomas
   This seems to work up to and including 259 characters in the filename
(not counting the file extension) on Windows (98).
Alan

- Original Message - 
From: "Alan Thomas" <[EMAIL PROTECTED]>
To: 
Sent: Monday, April 02, 2007 10:19 PM
Subject: Cannot write to auto-generated file name


>Is this an operating system issue or wget?
>
>I am using wget version 1.10.2b on Windows 98 and XP.  I had this
problem
> on both operating systems.  I downloaded the binaries from
> http://www.christopherlewis.com/.
>
>I created and executed the following batch file containing a wget
> command:
>
> wget --convert-links --directory-prefix="C:\Program
> Files\wget\test" --no-clobber --output-file=no_work_logfile.txt
>
"http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netaht
>
ml/PTO/search-adv.html&r=0&p=1&f=S&l=50&Query=isd/01/01/2000->12/31/2010+and
>
+(aclm/(software+and+hardware)+or+ttl/(software+and+hardware)+or+spec/(softw
> are+and+hardware))&d=PTXT"
>
> In this case, it does not like the automatically-generated filename.  The
> following is the resulting logfile:
>
> --21:50:18-- 
>
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netahtml/PTO/search-adv.html&r=0&p=1&f=S&l=50&Query=isd/01/01/2000-%3E12/31/2010+and+(aclm/(software+and+hardware)+or+ttl/(software+and+hardware)+or+spec/(software+and+hardware))&d=PTXT
>=> `C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware)+or+spec%
> 2F(software+and+hardware))&d=PTXT'
> Resolving patft.uspto.gov... 151.207.240.33, 151.207.240.26,
151.207.240.23
> Connecting to patft.uspto.gov|151.207.240.33|:80... connected.
> HTTP request sent, awaiting response... 200 Script results follow
> Length: unspecified [text/html]
> C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware)+or+spec%
> 2F(software+and+hardware))&d=PTXT: No such file or directory
>
> Cannot write to `C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware)+or+spec%
> 2F(software+and+hardware))&d=PTXT' (No such file or directory).
> C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware)+or+spec%
> 2F(software+and+hardware))&d=PTXT: No such file or directory
> Converting C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware)+or+spec%
> 2F(software+and+hardware))&d=PTXT... nothing to do.
> Converted 1 files in 0.000 seconds.
>
>However, when I eliminate the third field (spec) in the request, which
> shortens the length of the filename, like this:
>
> wget --convert-links --directory-prefix="C:\Program
> Files\wget\test" --no-clobber --output-file=works_logfile.txt
>
"http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netaht
>
ml/PTO/search-adv.html&r=0&p=1&f=S&l=50&Query=isd/01/01/2000->12/31/2010+and
> +(aclm/(software+and+hardware)+or+ttl/(software+and+hardware))&d=PTXT"
>
> it works fine.  Its logfile is:
>
> --21:50:06-- 
>
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netahtml/PTO/search-adv.html&r=0&p=1&f=S&l=50&Query=isd/01/01/2000-%3E12/31/2010+an
d+(aclm/(software+and+hardware)+or+ttl/(software+and+hardware))&d=PTXT
>=> `C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware))&d=PTXT'
> Resolving patft.uspto.gov... 151.207.240.23, 151.207.240.33,
151.207.240.26
> Connecting to patft.uspto.gov|151.207.240.23|:80... connected.
> HTTP request sent, awaiting response... 200 Script results follow
> Length: unspecified [text/html]
>
> 0K .. .. .. .. ..   63.36 KB/s
>50K ..  123.64 KB/s
>
> 21:50:12 (71.20 KB/s) - `C:/Program
>
Files/wget/test/[EMAIL PROTECTED]&Sect2=HITOFF&u=%2Fnetahtml%2FPTO%2Fsea
>
rch-adv.html&r=0&p=1&f=S&l=50&Query=isd%2F01%2F01%2F2000-%3E12%2F31%2F2010+a
>
nd+(aclm%2F(software+and+hardware)+or+ttl%2F(software+and+hardware))&d=PTXT'
> saved [66128]
>
> Conv