File System - Create folder

Declaration

<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="text" />

Related Topics    

Description

Creates a folder. If the folder specified is a subfolder 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)
  • FOLDER="c:\foldername\"
  • FOLDER="c:\foldername\subfoldername"
The full path and name of the folder to create.

Description

Error Causes

On Error

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Example 1

This sample task creates folder "C:\Temp\Folder1."

Copy
<AMFILESYSTEM ACTIVITY="create_folder" FOLDER="C:\Temp\Folder1" />

Example 2

This sample task creates subfolder "C:\Temp\Folder1\Subfolder1."

Copy
<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.

Copy
<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" />