-
Notifications
You must be signed in to change notification settings - Fork 4
Solution Automation CopyFilesAuto
Barbarur edited this page Sep 6, 2024
·
4 revisions
Solution Code: CopyFilesAuto
This solution has been replaced by CopyDuplicateFileAuto which includes additional features.
Copy files between libraries within the same site or different sites.
Run the solution with and account with at least SharePoint Admin role.
Parameter | Type | Description |
---|---|---|
Site Url | Required | Site where the sourcefiles are located. |
Document Library Title | Required | Document library where the sourcefiles are located. |
Files and Items filter | Optional | Selects which source files will be copied. It could be all files in the document library or only some of them. |
Parameter | Type | Description |
---|---|---|
Site Url | Required Choice |
Destination site where the sites will be copied. |
Document Library Title | Required | Name of the library where the files will be copied. |
Server relative path | Optional | You can specify a folder in the document library where thefiles will be copied. |
- Add account as Site Collection Admin for source site.
- Add account as Site Collection Admin for destination site.
- Checks the source site exists.
- Checks the destination site exists.
- Checks the source Library exists.
- Checks the destination Library exists.
- Checks the source library exists.
- Checks the destination Library exists.
- Checks the destination folder exists.
- Gets all the files from the source location.
- Iterates through all the files and perform:
- Checks the file doesn't exists in target location.
- Recreates the folder structure if missed.
- Copy the file to the target location.
- Removes account as Site Collection Admin for source site.
This solution only covers simple copy of the files at the moment. Only metadata that exists in the source and destiantion library will be copied.
In the future, it is planned this solution can also move files, including version history, manage metadata and content types.
Sites Collections and Subsites
Document Libraries and Item Lists
Files and Items
Recycle bin
Users
Sites Collections and Subsites
Document Libraries and Item Lists
Files and Items
- Copy or Duplicate files across sites
- Check In files
- Remove file versions
- Restore files from Preservation Hold Library
- Delete files from Preservation Hold Library
Recycle bin
Users
Users