Note: tests done on NT4. W9x probably would behave different (even worse).
starting from (for example) c:, with d: being another writable disk of some kind, something like wget -nd -P d:/dir http://www.previnet.it does work as expected. wget -nd -P d:\dir http://www.previnet.it also does work as expected. wget -P d:\dir http://www.previnet.it did create a directory d:\@5Cdir and started from there, in other words the \ is converted by wget since it doesn't recognize it as a valid local directory separator. wget -P d:/dir http://www.previnet.it failed in a way or another for the impossibility to create the correct directory or use it if already present. On the other hand, a little research in src/utils.c, make_directory() clearly shows only '/' is used as a directory separator. I'm wondering where the correct place for patching this (#ifdef WINDOWS obviously) would be - I suppose main.c, about line 648, case 'P': setval ("dirprefix", optarg); break; would be ok ? Or better call something in mswindows.c ? This would leave all the internal representation like before. It should be patched imho - when wget is running on windows it should accept local paths in local notation. Possibly in both notations since on most platforms wget will use / as dir separator, this shouldn't be a harm since / on windows is not a valid character for files or directories anyway. For example perls does it like this - dir/file or "dir\\file" or 'dir\file' is treated in the same way. Heiko -- -- PREVINET S.p.A. [EMAIL PROTECTED] -- Via Ferretto, 1 ph x39-041-5907073 -- I-31021 Mogliano V.to (TV) fax x39-041-5907087 -- ITALY > -----Original Message----- > From: Hrvoje Niksic [mailto:[EMAIL PROTECTED]] > Sent: Monday, January 14, 2002 2:07 PM > To: Wget List > Subject: Re: How does -P work? > > > Jens R�sner <[EMAIL PROTECTED]> writes: > > > Can I use -P (Directory prefix) to save files in a user-determinded > > folder on another drive under Windows? > > You should be able to do that. Try `-P C:/temp/'. Wget doesn't know > anything about windows backslashes, so maybe that's what made it fail. > > If it doesn't work, please post a debug log so we can see what's going > wrong. >
