Function CreateDir() Foundation

Creates a directory

Syntax
CreateDir( <cDirectory> ) --> lSuccess
Parameters
<cDirectory>
The argument <cDirectory> is the name of the directory to be created.
Return

The return value of CreateDir() is .T. if the directory could be created successfully or .F. if not. If .F. is returned the exact error code can be obtained by FError().

Description

The function creates a directory with the specified name. If no path was provided within the name the current directory is used as the root for the new directory.

Examples
Create a new directory
// The example shows various ways how 
// to create a new directory 

PROCEDURE Main 
   ? CreateDir("C:\MYAPP") 
   ? CreateDir("subdir") 
   ? CreateDir(Getenv("TEMP")+"\mytemp") 
   ? CreateDir('"\\srvgr4\bin\download\latest files"') 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.