getFileCount
|
|
Path
|
|
A string that contains a target file specification. May include the path to a folder and wildcards. If the path is omitted, the default directory will be used. See setCurDir for more details.
|
Default value: "*.*"
|
|
|
The number of files matching the specified condition.
|
|
|
ERR_OK
|
|
The flag set if successful.
|
|
ERR_FAILED
|
|
The flag set if failed.
|
|
The specified path should comply with the standard notations for directory names in Windows operating system. When you use the optional backslash character (\) in paths, you must place two backslashes (\\) in a string to represent a single backslash (\). If the drive letter is omitted in Path, the default directory will be used as a reference.
|
|
|
The following code returns the number of files in the sample folder that have a suffix between 10 and 19 :
|
|
setCurDir("samples")
|
count=getFileCount("*.1?.iwd")
|
Print count
|
|
The following code waits for an image file to appear in a folder to start processing it:
|
|
fMask="*.iwd"
|
setCurDir("c:\\images")
|
do
|
'wait for image
|
while getFileCount(fMask)=0
|
wait(10)
|
wend
|
|
'process
|
fName=getFileName(1, fMask)
|
print fName
|
loadIm(1, fName)
|
'remove from queue
|
delFile(fName)
|
sobel (1,2)
|
loop
|
|