4D v14.3

CREATE FOLDER

Home

 
4D v14.3
CREATE FOLDER

CREATE FOLDER 


 

CREATE FOLDER ( folderPath {; *} ) 
Parameter Type   Description
folderPath  String in Pathname to new folder to create
Operator in 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

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 475

The OK variable is changed by the commandThis command modifies the Error system variable

 
HISTORY 

Created: 4D v6
Modified: 4D v13

 
SEE ALSO 

FOLDER LIST
Test path name

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : CREATE FOLDER ( 4D v11 SQL Release 6)