|
File System - Create folder |
Declaration
<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="text" />
Description
Creates a folder. If the folder specified is a sub-folder and the parent folder does not exist, then it will also be created.
Practical Usage
Commonly used to automate the creation of a single folder. It can also create multiple folders that are numbered/named sequentially with the use of the Loop - Range activity.
Parameters
General Properties
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Folder | Text | Yes | (Empty) |
|
The full path and name of the folder to create. |
Examples
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
Example 1
This sample task creates folder "C:\Temp\Folder1."
<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="C:\Temp\Folder1" />
Example 2
This sample task creates subfolder "C:\Temp\Folder1\Subfolder1."
<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="C:\Temp\Folder1\Subfolder1" />
Example 3
This sample task demonstrates how to create 10 separate folders (named folder1 - folder10) using a loop action that increments a variable by one during each iteration.
<AMVARIABLE NAME="counterVariable" TYPE="NUMBER" VALUE="0"></AMVARIABLE>
<AMLOOP FROM="1" TO="10" RESULTVARIABLE="counterVariable" />
<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="C:\Temp\Folder%counterVariable%" />
<AMLOOP ACTIVITY="end" />