unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* multiple find and replace on windows using (gnu) find
@ 2006-10-12 14:59 md3bs
  2006-10-12 18:42 ` martin
  2006-10-13 15:16 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: md3bs @ 2006-10-12 14:59 UTC (permalink / raw)


find-dired does not work because I have filenames with spaces in them.

it does work when I use it on Linux

How can I do multiple find and replace on windows. This should be a common 
task. I can't seem to find any suggestions on the web. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: multiple find and replace on windows using (gnu) find
  2006-10-12 14:59 multiple find and replace on windows using (gnu) find md3bs
@ 2006-10-12 18:42 ` martin
  2006-10-13 12:33   ` md3bs
  2006-10-13 15:16 ` Eli Zaretskii
  1 sibling, 1 reply; 4+ messages in thread
From: martin @ 2006-10-12 18:42 UTC (permalink / raw)



>>>>> md3bs  <d.e.1.mayfield@herts.ac.uk> writes:
 > Date: Thu, 12 Oct 2006 15:59:53 +0100
 > 
 > find-dired does not work because I have filenames with spaces in
 > them.
 > 
 > it does work when I use it on Linux

Hi,

works for me on w2k with cygwin.

find-dired executes the command
find . \( -iname '* *' \) -exec ls -ld {} \;.

 > How can I do multiple find and replace on windows. This should be a
 > common task. I can't seem to find any suggestions on the web.

Mark the files you found by find-dired in the *Find* buffer and apply
dired-do-rename-regexp (% R).

Martin
-- 
parozusa at web dot de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: multiple find and replace on windows using (gnu) find
  2006-10-12 18:42 ` martin
@ 2006-10-13 12:33   ` md3bs
  0 siblings, 0 replies; 4+ messages in thread
From: md3bs @ 2006-10-13 12:33 UTC (permalink / raw)


Thanks Martin,

  I've tried this but I ran into problems.

  find . /( -name "*html" /) -exec ls -ld {} /;
      -c: line 1: syntax error near unexpected token `//('
      -c: line 1: `gnufind.exe . //( -name "*html" //) -exec ls -ld {} //;'

  The problem lies with the ls command handling spaces in file names ( see 
following tests ).

find . -maxdepth 1 \( -name "*html" \)
.\test with space.html
.\test.html

gnufind . -maxdepth 1 \( -name "*html" \) -exec ls ld {} \;
ls: ld: No such file or directory
ls: .\test: No such file or directory
ls: with: No such file or directory
ls: space.html: No such file or directory
ls: ld: No such file or directory
.\test.html

gnufind . -maxdepth 1 \( -name "*html" \) -exec echo {}  \;
.\test with space.html
.\test.html


"martin" <nospam@nospam.net> wrote in message 
news:vqzmc1l6j0.fsf@nospam.net...
>
>>>>>> md3bs  <d.e.1.mayfield@herts.ac.uk> writes:
> > Date: Thu, 12 Oct 2006 15:59:53 +0100
> >
> > find-dired does not work because I have filenames with spaces in
> > them.
> >
> > it does work when I use it on Linux
>
> Hi,
>
> works for me on w2k with cygwin.
>
> find-dired executes the command
> find . \( -iname '* *' \) -exec ls -ld {} \;.
>
> > How can I do multiple find and replace on windows. This should be a
> > common task. I can't seem to find any suggestions on the web.
>
> Mark the files you found by find-dired in the *Find* buffer and apply
> dired-do-rename-regexp (% R).
>
> Martin
> -- 
> parozusa at web dot de 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: multiple find and replace on windows using (gnu) find
  2006-10-12 14:59 multiple find and replace on windows using (gnu) find md3bs
  2006-10-12 18:42 ` martin
@ 2006-10-13 15:16 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2006-10-13 15:16 UTC (permalink / raw)


> From: "md3bs" <d.e.1.mayfield@herts.ac.uk>
> Date: Thu, 12 Oct 2006 15:59:53 +0100
> 
> find-dired does not work because I have filenames with spaces in them.
> 
> it does work when I use it on Linux
> 
> How can I do multiple find and replace on windows. This should be a common 
> task. I can't seem to find any suggestions on the web. 

You don't need find-dired for that, the normal Dired will do.  It has
the `Q' command that will perform find and replace on all the files
you mark.  If you need to do this recursively in subdirectories, use
the `i' command to insert subdirectories into the Dired buffer.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-13 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 14:59 multiple find and replace on windows using (gnu) find md3bs
2006-10-12 18:42 ` martin
2006-10-13 12:33   ` md3bs
2006-10-13 15:16 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).