This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
CREATE FOLDER
|
CREATE FOLDER ( folderPath {; *} ) | ||||||||
Parameter | Type | Description | ||||||
folderPath | String |
![]() |
Pathname to new folder to create | |||||
* | Operator |
![]() |
Create folder hierarchy | |||||
The CREATE FOLDER command creates a folder according to the pathname you pass in folderPath.
If you pass a name in folderPath, the folder is created in the database folder.
In folderPath, you can also pass a folder hierarchy starting from the root of the volume or from the database folder (in this case, the string must end with a folder separator).
If you omit the * parameter, an error is generated and no folder is created if any one of the intermediary folders does not exist.
If you pass the * parameter, CREATE FOLDER recreates the folder hierarchy if necessary and no error is generated. In this case, you can also pass a document pathname in folderPath. The document name is then ignored but the folder hierarchy specified in folderPath is created recursively
The following example creates the “Archives” folder in the folder of the database:
CREATE FOLDER("Archives")
The following example creates the Archives folder in the folder of the database, then it creates the “January” and “February” subfolders:
CREATE FOLDER("Archives")
CREATE FOLDER("Archives\\January")
CREATE FOLDER("Archives\\February")
The following example creates the “Archives” folder at the root level of the C volume:
CREATE FOLDER("C:\\Archives")
Creation of the "C:\Archives\2011\January\" folder hierarchy:
CREATE FOLDER("C:\\Archives\\2011\\January\\";*)
Creation of the "\February\" subfolder in the existing "C:\Archives\" folder:
CREATE FOLDER("C:\\Archives\\2011\\February\\Doc.txt";*)
// the "Doc.txt" file is ignored
Product: 4D
Theme: System Documents
Number:
475
Created: 4D v6
Modified: 4D v13
4D Language Reference ( 4D v20 R7)