>>Both returns result in a flash. After second verification, for that one, I only need count from the directory and not on a scope. So, as long as I only need the count without the scope, I'll use the FileSystemObject. If I ever need a scope, I'll switch to Larry's suggestion.
>
>Its a shame that NOCONSOLE doesn't work on DISPLAY FILES for DIR (even though the Intellisense window says they do, otherwise, you coudl try something like:
>
>
DIR \g5\imsdev\data\*.JPG TO FILE textdir.txt
>?OCCURS('.JPG', FILETOSTR('textdir.txt'))
How about using redirection? This is supported by many DOS commands.
Change the first line to:
dir \g5\imsdev\data\*.jpg > textdir.txt
This will still briefly show the command window. I think some of the files in the download section solve this.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)