-
Notifications
You must be signed in to change notification settings - Fork 8
Solution Automation CopyDuplicateFileAuto
Barbarur edited this page Sep 6, 2024
·
1 revision
Solution Code: CopyDuplicateFileAuto
Copy or duplicate 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 choice |
Site where the source files are located. |
| Document Library Title | Required | Document library where the source files 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 |
|---|---|---|
| Copy | Required choice |
A copy of the last version will be created. Metadata (Created, Created by, Modify and Modify By) of the new file will reflect the copy action. |
| Duplicate | Required choice |
A full duplication will be created on the target location. All versions will be recreated and metadata will be the same as the original file. |
| 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 the files 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:
- Copy/Duplicate item on the target location.
- Removes account as Site Collection Admin for source site.
This solution covers copy and duplication of the files at the moment. Only custom metadata that exists in the source and destination library will be copied.
In the future, it is planned to include the full recreation of a Document library.
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