4D v16.3

CREATE FOLDER

Home

 
4D v16.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



See also 

FOLDER LIST
Test path name

 
PROPERTIES 

Product: 4D
Theme: System Documents
Number: 475

The OK variable is changed by the commandThis command modifies the Error system variableThis command can be run in preemptive processes

 
HISTORY 

Created: 4D v6
Modified: 4D v13

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)