0

I used Gnuwin32 wget to download emacs manuals with this command (takes about 30 minutes):

wget --mirror --page-requisites --convert-links --no-parent --accept .html,.htm,.css,.js http://www.gnu.org/software/emacs/manual/

the downloaded manuals seemed fine except for one problem, Windows does not distinguish between index.html and Index.html, so wget downloads the two into same path in Windows. For example,

http://www.gnu.org/software/emacs/manual/html_node/elisp/index.html

and

http://www.gnu.org/software/emacs/manual/html_node/elisp/Index.html

are different URLs, and both download to

current_folder/www.gnu.org/software/emacs/manual/html_node/elisp/index.html

Is there a way to work around this?

Update:

alternate example that doesn't take 30 minutes (only takes 30 seconds)

wget -P new --mirror --page-requisites --convert-links --no-parent --accept .html,.htm,.css,.js http://www.gnu.org/software/emacs/manual/html_node/ses/index.html

with --no-clobber

wget -P new-nc --no-clobber -r -l inf --page-requisites --convert-links --no-parent --accept .html,.htm,.css,.js http://www.gnu.org/software/emacs/manual/html_node/ses/index.html
Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Jisang Yoo
  • 447
  • 1
  • 5
  • 13

1 Answers1

1

The Win32 subsystem on Windows is unable to distinguish between files that differ only in name. Understanding the full implications of what I just wrote requires a lot of research into the internals of Windows.

To put it briefly, every program on Windows runs under some "subsystem". A subsystem is a user space "stack" sitting on top of the kernel which has a common set of APIs and libraries.

There are only three subsystems: POSIX, Win32, and OS/2. OS/2 is deprecated and probably doesn't work. Win32 is what 99.9999% of all programs (including those part of Gnuwin32 and Cygwin) run under. POSIX is what Services For UNIX (SFU) runs under.

How do you make Windows 7 fully case-sensitive with respect to the filesystem? has some good answers and some bad answers. Ignore the detritus about the registry settings; that's all hogwash. The relevant comment is venimus's "update" comment.

To put it simply, the only way you can run a program on Windows that can properly distinguish between files whose names differ only in case is to use the Subsystem for UNIX. Fortunately for you, wget is a very common program under such subsystem, so you should be able to install SFU (if you are so licensed to do so) and play with it. Good luck.

allquixotic
  • 34,882