Move an Item To a Folder

Moves an item (folder or file) to a given folder using the Microsoft Graph API.

Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

move the item to the folder

What does it do? This is the base syntax for the procedure.

Where does it go? This phrase should be written on a new line.

Is it required? ✅ Yes — This phrase is required in the syntax.

Does it require input data? ✅ Yes — An item (folder or file) that will be moved must be specified for the item and the destination folder where the item will be moved must be specified for the folder.

the file name is

What does it do? Specifies the new name for the move. If this isn't provided, the same name will be used as the original.

Where does it go? This phrase should be indented beneath move the item to the folder

Is it required? 🌟 No — This phrase is optional in the syntax.

Does it require input data? ✅ Yes — A text value should be specified as the new name for the move. If this isn't provided, the same name will be used as the original.

Example: the file name is "file name"

the conflict behavior is

What does it do? Specifies the behavior when a conflict occurs. Possible values are 'fail', 'replace', 'rename'.

Where does it go? This phrase should be indented beneath move the item to the folder

Is it required? 🌟 No — This phrase is optional in the syntax.

Does it require input data? ✅ Yes — A text value should be specified as the behavior when a conflict occurs. Possible values are 'fail', 'replace', 'rename'.

Example: the conflict behavior is "replace"

Default: rename

Examples

1. Move an item to a folder

get a folder at "/My Site/My Documents/My Folder"
use the above as the source folder
get a folder at "/My Site/My Documents/My Other Folder"
use the above as the destination folder
move the source folder to the destination folder

Last updated

Was this helpful?