Lennart Borgman wrote:
In any case the command string that is built and send to CMD does not
work. Here I am using the GnuWin32 port of find, version 4.2.20. Find
complains about the first -exec:
find . \( -type f -exec grep -q -e "message" {} \; \) -exec ls
-ld {} \;
find: missing argument to `-exec'
Stepping through shell-quote-argument it I can see that it tales the
'windows-nt path so that should be ok. There is only one call to
shell-quote-argument involved and that is from find-grep-dired.
How should the above command look in this case? I am not very
familiar with find. Perhaps is it not possible to give this command
with CMD.EXE?
I haven't tried it myself, but I think the following will work with
cmd.exe and a native port of GNU find:
find . ( -type f -exec grep -q -e "message" {} ; ) -exec ls -ld {} ;
The problem appears to be that although the string to pass to grep is
passed to shell-quote-argument, other parts of the expression have
hard-coded backslashes. However, passing them to shell-quote-argument
will introduce extra double-quotes on Windows, and I am not sure
whether that will work or not.