Hi. I'm trying to test for the existence of a file in a directory that meets the criteria of *powerbasic*.txt for instance.
If I do
a$="cmd /c dir c:\pb35\*powerbasic*.txt"
shell a$
(note the *powerbasic*.txt actually gets made up with chr characters as there may be spaces in the search"
then command will check for the presence of this lfn format file search and it also allows for the leading wildcard.
What I can't work out is how to retrieve the "file not found" error as a 1 or 0.
Thanks in advance if someone can help.
If I do
a$="cmd /c dir c:\pb35\*powerbasic*.txt"
shell a$
(note the *powerbasic*.txt actually gets made up with chr characters as there may be spaces in the search"
then command will check for the presence of this lfn format file search and it also allows for the leading wildcard.
What I can't work out is how to retrieve the "file not found" error as a 1 or 0.
Thanks in advance if someone can help.
Comment