The MS-Windows way of globbing is described at MSDN: http://msdn.microsoft.com/library/en-us/vclang/html/_pluslang_Parsing_C.2b2b_.Command.2d.Line_Arguments.asp
From this description it seems that your example should work; also nativecommands, such as dir, do expand the * when inside quotes. So possibly this behaviour of cp and other coreutils programs, is a bug, either in the Gnuwin32 port or in some system library, such as msvcrt.dll.
Other MS-Windows ports, such as Cygwin, Djgpp and Unixutils, have the same behaviour, so I suspect it is a bug of some system library.
Kees Zeelenberg
From: Adin Burroughs Subject: Re: Filename Globbing issues on Win32? Date: Mon, 9 May 2005 12:59:32 -0600
--------------------------------------------------------------------------------
I'm actually using the coreutils compiled and bundled with the GnuWin32 and UnxUtils projects. Both projects still refer back to the original Gnu coreutils lists. I may crosspost this thread over to those guys if I'm not totally crazy on this. :)
And moving the asterisk outside the quotes didn't work: (ok, actual examples from the commandline this time)
<quote>
C:\Documents and Settings\Adn>cp "c:\Program Files\Sony Handheld\adn\sunrise\s
lot0\"* k:\palm\PROGRAMS\plucker
cp: missing destination file operand after `c:\\Program Files\\Sony Handheld\\ad
n\\sunrise\\slot0"* k:\\palm\\PROGRAMS\\plucker'
Try `cp --help' for more information.
C:\Documents and Settings\Adn>cp "c:\Program Files\Sony Handheld\adn\sunrise\s
lot0"\* k:\palm\PROGRAMS\plucker
cp: cannot stat `c:\\Program Files\\Sony Handheld\\adn\\sunrise\\slot0\\*': Inv
alid argument
C:\Documents and Settings\Adn>cp --version cp (GNU coreutils) 5.3.0 Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</endquote>
-adin
On 5/9/05, Philip Rowlands <[EMAIL PROTECTED]> wrote:
On Mon, 9 May 2005, Adin Burroughs wrote:
>OK, first off, I'm on Win32 (XP) using 5.3 of coreutils. > >I have been knocking my head on this and I'm feeling *really* stupid. >I swear, I'm unix literate, but I can't seem to get the following to >work without cheating: > >cp -uvp "c:\dir with space\long path\*" k:\path
-- First, Do No Harm. Second, Do Good. --unknown
_______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
