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 the creation of a single folder. It can also create multiple folders that are numbered/named sequentially with the use of the Loop action.

General Parameters

Property

Type

Required

Default

Markup

Description

Folder

Text

Yes

(Empty)

  1. FOLDER="c:\foldername\"

  2. FOLDER="c:\foldername\subfoldername"

The full path and name of the folder to create.

Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.

Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)

On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)

Examples

The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

Example 1 - Create folder "C:\Temp\Folder1".  

<AMCREATEFOLDER FOLDER="C:\Temp\Folder1" />

Example 2 - Create subfolder "C:\Temp\Folder1\Subfolder1".

<AMCREATEFOLDER FOLDER="C:\Temp\Folder1\Subfolder1" />

Example 3 - This sample 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">0</AMVARIABLE>
<AMLOOP TOTALLOOPS="10" RESULTVARIABLE="counterVariable">
<AMCREATEFOLDER FOLDER="C:\Temp\Folder%counterVariable%" />
</AMLOOP>