I tried running find-name-dired from one of my dired buffers. I got this:

find . "(" -iname "*.cc" ")" -exec ls -ld {} ";"
  File not found - "*.cc"
  find exited abnormally with code 2 at Fri Feb 23 23:28:07

I'm running on Windows 11, emacs-version: GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02.

I see a question about this here, but the answers don't work for me. I do have Git installed so I tried the recommendation:

(setq find-program "\"c:/Program Files/Git/usr/bin/find.exe\"")

But then I just get an error about a missing ls.

  "c:/Program Files/Git/usr/bin/find.exe" . "(" -iname "*.cc" ")" -exec ls -ld {} ";"
  /usr/bin/find: 'ls': No such file or directory
  /usr/bin/find: 'ls': No such file or directory

It seems strange to me that I downloaded an Emacs build for Windows, but commands are assuming I'm on a Unix system. Am I supposed to install Cygwin? Or do people running Windows have other ways to get this to work?

1 Answer 1


Try installing EZWinPorts

The EZWinPorts project provides many useful ports of recent versions of GNU and Unix software. This includes all the optional libraries used by Emacs (image libraries, libxml2, GnuTLS), RCS, Texinfo, a clone of man command, Grep, xz, bzip2, bsdtar, ID Utils, Findutils, Hunspell, Gawk, GNU Make, Groff, GDB.

From the project page https://sourceforge.net/projects/ezwinports/

This project is a collection of ports to MS-Windows of GNU and Unix software packages, which either don't have precompiled Windows binaries available, or whose existing ports are buggy or broken.

All the ports are built using the MinGW development environment, with or without MSYS.

The project is maintained by Eli Zaretskii, the current Emacs mainainer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.