steve4king
IS-IT--Management
I am writing a simple little utility, and in this utility, I am giving the user the option to enter a directory. It works fine unless the user selects a non-existent directory.
I was hoping I could just use code similar to t-sql "if exists.." but apparently that doesnt work.
I tried using "If DIRECTORY(G:\foldername)..." and it returned "Function name is missing"
I tried "dDir = DIRECTORY(G:\foldername)" also did not work.
What am I doing wrong? is there a better way to do this check? I just want the utility to exit gracefully if a nonexistant directory is entered.
I was hoping I could just use code similar to t-sql "if exists.." but apparently that doesnt work.
I tried using "If DIRECTORY(G:\foldername)..." and it returned "Function name is missing"
I tried "dDir = DIRECTORY(G:\foldername)" also did not work.
What am I doing wrong? is there a better way to do this check? I just want the utility to exit gracefully if a nonexistant directory is entered.