What is the best way to check if a directory exists?
I have been using...
set the defaultfolder to tFolderToSearch
if the result is "can't open directory" then....
Not sure if this is correct?
Warren
Checking if directory exists
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Warren, you're going to love this one: Rev has a "there is" operator, e.g.:
Nice, eh?
Rev also supports "there is not":
You can use these with files, folders, and object descriptors.
Code: Select all
if there is a folder tFolderToSearch then
Rev also supports "there is not":
Code: Select all
if there is not a folder tFolderToSearch then
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn