Command Prompt for Windows




fillfile, _wfillfile, _tfillfile

int fillfile(char *path, unsigned int attr);
int _wfillfile(wchar_t *path, unsigned int attr);
int _tfillfile(TCHAR *path, unsigned int attr);

Create a File Table of all the files in a given path and with a given attribute.

Parameter Description
path Address of a NULL terminated character string containing a path. This path can be relative or absolute and can contain Wildcard characters any where in the filename part of the path.
attr DOS File attribute (defined in DOS.H), include the following :-
FA_RDONLYRead-only
FA_HIDDENHidden file
FA_SYSTEMSystem file
FA_LABELVolume label
FA_DIRECDirectory
FA_ARCHArchive

Returns

On success, it returns the number of files that match the path and attribute specified, otherwise, it returns a value of zero, when no files match.

Comments

Function fillfile() replaces findfirst(), findnext(), _dos_findfirst() and _dos_findnext(), since these functions do not support extended wildcard card characters.

The WinOne® Command Prompt allows wildcard characters to be placed anywhere inside a filename and be correctly interpreted.

All files that meet the specifies requirements are places inside a table (ie. File Table) which is over-written with each call to this function. Use the getfile...() functions to access the information stored in this table.

The table is sorted in alphabetical order.

See Also

getfile, getfilepath, getfilename