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

Reply via email to