Usage
m365 file copy
Description
Copies a file to another location using the Microsoft Graph
Options
Option
Description
-u, --webUrl <webUrl>
The URL of the site where the file is located.
-s, --sourceUrl <sourceUrl>
Server-relative or absolute URL of the file.
-t, --targetUrl <targetUrl>
Server-relative or absolute URL of the location.
--newName [newName]
New name of the destination file.
--nameConflictBehavior [nameConflictBehavior]
Behavior when a document with the same name is already present at the destination. Possible values: fail, replace, rename. Default is fail.
Examples
Copies a file using the graph
m365 file copy--webUrl https://contoso.sharepoint.com/sites/project --sourceUrl " /sites/project/Shared Documents/Document.pdf" --targetUrl " /sites/IT/Shared Documents"
Default properties
No response
Additional Info
We currently have a m365 file add command using the Microsoft Graph this should be part of that command structure
Should use the new Drive API
Validate if we already have appropriate permissions for this command
Related to New command: m365 file move #4607
Usage
m365 file copy
Description
Copies a file to another location using the Microsoft Graph
Options
-u, --webUrl <webUrl>-s, --sourceUrl <sourceUrl>-t, --targetUrl <targetUrl>--newName [newName]--nameConflictBehavior [nameConflictBehavior]fail,replace,rename. Default isfail.Examples
Copies a file using the graph
Default properties
No response
Additional Info
m365 file addcommand using the Microsoft Graph this should be part of that command structure