WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

File Operations

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

File Mask Matching


Question:

Create a couple of files in a directory:
a b
a b.c
(that's "a[space]b" and "a[space]b.c".) FileItemize("a*") returns only a b and ignores a b.c.

FileItemize("a *") is the same.

This is under WB 2006E.

Answer:

It is not a bug. You have to be really careful about the filemask you specify. The file mask a* will match all files with NO File extension. Maybe you want a*.*

Or you can use IntControl 91 to modify the behavior of functions which take file masks. If you add IntControl(91,2,0,0,0) before the FileItemize, it will cause it to use an alternate method (PathMatchSpec API) to handle file mask. I believe it will then handle a* as you expect....


Article ID:   W16961
File Created: 2007:07:03:14:27:20
Last Updated: 2007:07:03:14:27:20