Change Folder

Declaration

<AMCHANGEFOLDER FOLDER="text" />

See Also

Split File, Move File, Create Folder, Delete File, Delete Folder, Rename Folder, Remove Folder, Touch File, Set Attributes, Read from File, Write to File, Synchronize Folders, Concatenate Files,  Calculate File Checksum

Description

Changes the current folder for the running task. Useful in eliminating the need to specify folder locations in subsequent file related steps.

NOTE: Use this action only when necessary, otherwise utilize fully qualified path names such as 'c:\foldername\filename.txt' when performing file related actions.

Practical Usage

Mainly used to change the "current working directory". Required when using relative paths and file names.

Parameters

General Properties

Property

Type

Required

Default

Markup

Description

Folder

Text

Yes

(Empty)

FOLDER="C:\Temp\FolderName"

Specifies the path and name of the folder to change to.

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Change to folder "c:\documents\folder1".  

 

<AMCHANGEFOLDER FOLDER="c:\documents\folder1" />

 

↑ Top of Page