Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTFSD

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


RE: Directory listings with pattern (was RE: How to q uery for a long filename using IRP_M

OSR_Community_UserOSR_Community_User Member Posts: 110,217
You caught me, Dan. Absolutely right. Zero or more. I'm assuming there is
a brilliant discussion of this somewhere in the IFS Kit documentation, of
course (right Diane? ;-) )

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com


-----Original Message-----
From: Dan Kyler [mailto:[email protected]]
Sent: Tuesday, November 19, 2002 6:48 PM
To: File Systems Developers
Subject: [ntfsd] RE: Directory listings with pattern (was RE: How to query
for a long filename using IRP_MJ_DIRECTO RY_CONTROL/IRP_MN_QUERY_DIR
ECTORY?)

Hi Tony,

> * = "match one or more characters"

I believe that should read "zero or more".

- Dan.

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tony Mason
Sent: Tuesday, November 19, 2002 12:47 PM
To: File Systems Developers
Subject: [ntfsd] RE: Directory listings with pattern (was RE: How to
query for a long filename using IRP_MJ_DIRECTO
RY_CONTROL/IRP_MN_QUERY_DIR ECTORY?)


There are five wildcard characters in the Windows pattern matching
syntax (that is the syntax implemented by FsRtlIsNameInExpression, that
venerable and nearly inscrutable function.)

* = "match one or more characters"
? = "match one character"
< = "match one or more characters using MS-DOS semantics"
> = "match one character using MS-DOS semantics"
" = "match dot using MS-DOS semantics"

Thus, the last three are for MS-DOS compatibility, which restricts the
character set that can match. For example, spaces are allowed in MS-DOS
names, but not before or after the dot. These MS-DOS patterns match
those semantics.

For building your own strings, I highly recommend sticking with the
Windows semantics, not the MS-DOS semantics.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com


-----Original Message-----
From: Tobias [mailto:[email protected]]
Sent: Tuesday, November 19, 2002 12:14 PM
To: File Systems Developers
Subject: [ntfsd] Directory listings with pattern (was RE: How to query
for a long filename using IRP_MJ_DIRECTO
RY_CONTROL/IRP_MN_QUERY_DIRECTORY?)

Don't wanna bother, but for (3) I have some additional questions.

The format of "*.doc" is really easy to use (especially when building
directory information buffers), but how about those special wildcards
like "\"" or "<" ( C notation, it's hard to quote a " :) ) ? Is there an
overview of all options for directory wildcards and their meaning
somewhere? Or can one simply use * for any illegal non-zero character?

Regards & TIA,
Tobias


----- Original Message -----
From: "Tony Mason" <[email protected]>
To: "File Systems Developers" <[email protected]>
Sent: Tuesday, November 19, 2002 2:59 PM
Subject: [ntfsd] RE: How to query for a long filename using
IRP_MJ_DIRECTO RY_CONTROL/IRP_MN_QUERY_DIRECTORY?

> (3) This can either be a file name you wish to find (not a path, just
> a
> filename) or a regular expression (e.g., "*.doc" to find all of the
DOC
> files within the directory.) That name will be used to match the
short OR
> long file name.



---
You are currently subscribed to ntfsd as: [email protected]
To unsubscribe send a blank email to %%email.unsub%%

---
You are currently subscribed to ntfsd as: [email protected]
To unsubscribe send a blank email to %%email.unsub%%



---
You are currently subscribed to ntfsd as: [email protected]
To unsubscribe send a blank email to %%email.unsub%%
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 26 Feb - 1 Mar 2024 Live, Online