Thanks. I had tried that before without success but I was using the command in a bat file. If I copy and paste that command into a DOS command window, it works fine. But if I use the command through a bat file, it does not work. The %23 gets changed to a 3. So it must be a windows/dos issue?
Thanks again for the help, Mark -----Original Message----- From: Dale R. Worley [mailto:[email protected]] Sent: Monday, November 13, 2017 6:19 PM To: [email protected] Cc: [email protected] Subject: Re: [Bug-wget] Bug? < <mailto:[email protected]> [email protected]> 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/> 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_> 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 to. 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': <ftp://ftp.3gpp.org/tsg_cn/WG4_protocollars/TrFO_%2301_stockholm/> ftp://ftp.3gpp.org/tsg_cn/WG4_protocollars/TrFO_%2301_stockholm/ 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. Dale
