Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you test if and folder/directory exists?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I know that I can use the file() function to test if a file exists. Is there a function that will test for the existance of a directory or sub-directory?
 
Hi GKJ423:

****************************
*Assgn Directory/Folder name to a varaible
LOCAL myDir
myDir = "C:\DirectoryName"

*If Directory created above does not already exist than *MD Make Directory else.......

IF ! DIRECTORY(myDir)
MD &myDir
ENDIF
****************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top