shell expansion produces e.g. "ls: cannot access '*.pdf': No such file or directory" in Windows CMD shell, but works okay in bash

Andrey Repin
Sat Mar 28 12:21:33 GMT 2020

Greetings, Jay Libove!

> I've never seen this before.
> In a Windows CMD shell, Cygwin shell expansion, for example:
> ls *.pdf

> returns:
> ls: cannot access '*.PDF': No such file or directory
> (Indeed, any Cygwin shell expansion, when executed from within Windows CMD, produces this error. See below)

> ls *someotherwildcard* (that matches the same .pdf files) DOES return the expected file list.

Adding to the previous answers, in regard to "ls *.pdf" vs. "ls *.PDF" from
native shell, there's "glob:ignorecase" CYGWIN option that can amend your issue.

With best regards,
Andrey Repin
Saturday, March 28, 2020 15:19:24

Sorry for my terrible english...

More information about the Cygwin mailing list