Also, I should point out that ``glob`` doesn't require ``with-directory``:

    "C:\dir\**\progname" glob



On Sat, Oct 29, 2016 at 8:39 AM, John Benediktsson <mrj...@gmail.com> wrote:

> You can use recursive globs (which are case-insensitive) as @bjourne says,
> or you can use ``find-all-files`` in io.directories.search. The name is the
> fully qualified name, so if you want to match only on the file-name you can
> do:
>
> USE: io.directories.search
>
> "C:\dir" [ file-name R/ progname/i matches? ] find-all-files
>
> "C:\dir" [ file-name >lower "progname" = ] find-all-files
>
> Or you can use the FindFile/FindNextFile directly by looking at the code
> in io.directories.windows.
>
> Best,
> John.
>
>
> On Sat, Oct 29, 2016 at 8:30 AM, Björn Lindqvist <bjou...@gmail.com>
> wrote:
>
>> Perhaps you can use ant-globs. Like this:
>>
>> USE: globs
>> "/the/dir" [ "**/progname*" glob ] with-directory
>>
>> It appears to fold case by default so it should match any PROGNAME
>> files too. It also matches directories which you might want to filter
>> out.
>>
>> 2016-10-29 16:41 GMT+02:00 Alexander Ilin <ajs...@yandex.ru>:
>> > Hello!
>> >
>> > What's the best way to search for all files matching a pattern
>> "progname.*"?
>> > Note: in Windows the "name" part is case-insensitive.
>> >
>> > I see that we have `find-by-extension` in `io.directories.search`, but
>> > nothing to search by name.
>> >
>> > I want to find and scan all log-files in a folder, created by a program
>> that
>> > uses "progname.<num>" scheme for naming its files, and the casing in the
>> > "progname" part is not always the same.
>> >
>> > If I were using FindFirstFile/FindNextFile WinAPI, I would have just
>> > supplied the "progname.*" mask, but I see no way to supply the mask via
>> the
>> > high-level calls, and I don't want to allocate the platform-specific
>> > `<struct>`s in my code.
>> >
>> > What would be the best way to search for the thing I need? Do we have a
>> > case-insensitive regexp matcher?
>> >
>> > ---=====---
>> > Александр
>> >
>> >
>> > ------------------------------------------------------------
>> ------------------
>> > The Command Line: Reinvented for Modern Developers
>> > Did the resurgence of CLI tooling catch you by surprise?
>> > Reconnect with the command line and become more productive.
>> > Learn the new .NET and ASP.NET CLI. Get your free copy!
>> > http://sdm.link/telerik
>> > _______________________________________________
>> > Factor-talk mailing list
>> > Factor-talk@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/factor-talk
>> >
>>
>>
>>
>> --
>> mvh/best regards Björn Lindqvist
>>
>> ------------------------------------------------------------
>> ------------------
>> The Command Line: Reinvented for Modern Developers
>> Did the resurgence of CLI tooling catch you by surprise?
>> Reconnect with the command line and become more productive.
>> Learn the new .NET and ASP.NET CLI. Get your free copy!
>> http://sdm.link/telerik
>> _______________________________________________
>> Factor-talk mailing list
>> Factor-talk@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/factor-talk
>>
>
>
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to