Skip to main content

Microsoft 365 SharePoint - Move or Rename Files in SharePoint

Overview​

This blueprint can be used to move or rename one or multiple files in Microsoft SharePoint.

The match type selected greatly affects how this Blueprint works.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Client IDSHAREPOINT_CLIENT_IDPasswordβœ…--The Client ID of the app created in Azure
Client SecretSHAREPOINT_CLIENT_SECRETPasswordβœ…--The secret value of the app created in Azure
TenantSHAREPOINT_TENANTAlphanumericβœ…--The ID of the tenant associated with the app
Site NameSHAREPOINT_SITE_NAMEAlphanumericβœ…--The name of the SharePoint Site
Shipyard File Match TypeSHAREPOINT_FILE_MATCH_TYPESelectβž–exact_matchExact Match: exact_match

Regex Match: regex_match

The match type used to identify files to load
Source FileSHAREPOINT_SRC_FILEAlphanumericβž–--The name of the source file in SharePoint
Source Folder NameSHAREPOINT_SRC_FOLDER_NAMEAlphanumericβž–--The optional folder of where the source file is located. If omitted, the files will be loaded to the root directory
Target Folder NameSHAREPOINT_TARGET_FOLDER_NAMEAlphanumericβž–--The name of the folder to move the source file to
Target File NameSHAREPOINT_TARGET_FILE_NAMEAlphanumericβž–--The name of the new file once moved/renamed. If omitted, the original name will be retained

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: Microsoft 365 SharePoint - Move or Rename Files in SharePoint
inputs:
SHAREPOINT_CLIENT_ID: null ## REQUIRED
SHAREPOINT_CLIENT_SECRET: null ## REQUIRED
SHAREPOINT_TENANT: null ## REQUIRED
SHAREPOINT_SITE_NAME: null ## REQUIRED
SHAREPOINT_FILE_MATCH_TYPE: exact_match
SHAREPOINT_SRC_FILE: null
SHAREPOINT_SRC_FOLDER_NAME: null
SHAREPOINT_TARGET_FOLDER_NAME: null
SHAREPOINT_TARGET_FILE_NAME: null
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '180'
- '181'
- '182'
- '183'
- '184'
- '200'
- '202'
- '203'
- '204'
- '205'
- '206'
- '207'
- '208'
- '209'
- '210'
- '249'