Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding a blank directory.
Message
From
30/06/1997 13:44:40
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00038130
Message ID:
00038143
Views:
34
>I can't seem to find a way to tell if a directory exists. It seems like such a simple task, but the only thing I can think of is to use the FILE command to find a file inside the directory in question. What if there are no files in the directory? I thought I'd better ask the experts before I waste too much time on a seemingly simple task. Thanks for any help.
>Marcus.

cFilename="c:\test.txt"
cNewfilename="c:\qwertrty\test.txt"
on error lErrorflag=.t.
copy file &cFilename. to &cNewfilename.
on error
if lErrorflag=.t.
=messagebox("No folder 'qwertrty' found")
else
=messagebox("Folder 'qwertrty' found")
delete file &cNewfilename.
endif
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform