[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Bug?

From: mas985
Subject: Re: [Bug-wget] Bug?
Date: Tue, 14 Nov 2017 07:39:19 -0800


So with a little research, when using the %23 escape sequence in a bat file,
two % signs are needed to escape the % in the bat file. So it all works now.



-----Original Message-----
From: Dale R. Worley [mailto:address@hidden 
Sent: Monday, November 13, 2017 6:19 PM
To: address@hidden
Cc: address@hidden
Subject: Re: [Bug-wget] Bug?

<address@hidden> writes:
> I am running WGET from a command line but the server folder has a 
> pound sign in the name. It looks like Wget cannot parse the folder 
> name and truncates it at the # sign and so the files don't get 
> downloaded. I have the folder path in quotes. Is anyone aware of this
problem or know of a fix?
> "C:\Program Files (x86)\GnuWin32\bin\wget.exe" -m -nH -np 
> "ftp://ftp.3gpp.org/tsg_cn/WG4_protocollars/TrFO_#01_stockholm/";

It's a subtle usage error.  The character '#' in URLs is a special
character, which is used to separate the "fragment identifier"
("01_stockholm/") from the main part of the URL.  What this means is that
one is expected to fetch the "resource" identified by the main URL
("ftp://ftp.3gpp.org/tsg_cn/WG4_protocollars/TrFO_";) and then look within
that resource to find the part identified by "01_stockholm/".
The only common use is with resources that are HTML files, where the
fragment identifier matches the "target" attribute of some "a" tag and
indicates the part of the HTML page that one should direct ones attention

In the case of FTP URLs, if the name of one of the folders contains a '#'
character, it has to be coded in the URL as a "percent-escape", in this
case, '%23':


I'm running on Linux, not Windows, but if I execute

wget 'ftp://ftp.3gpp.org/tsg_cn/WG4_protocollars/TrFO_%2301_stockholm/'

I go get a directory listing of that folder.

See RFC 1738 section 3.2 for the details.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]