Skip to content

New command: copy file #286

@waldekmastykarz

Description

@waldekmastykarz

Copy the specified file to another location

  • command: spo file copy -w|--webUrl <webUrl> -u|--sourceUrl <sourceUrl> -t|--targetUrl <targetUrl> --overwriteIfAlreadyExists --skipSourceFolderName
  • webUrl: The URL of the site where the file is located
  • sourceUrl: site-relative URL of the file or folder to copy
  • targetUrl: server-relative URL where to copy the file or folder to
  • overwriteIfAlreadyExists: If provided, if a file already exists at the targetUrl, it will be overwritten. If ommitted, the copy operation will be canceled if the file already exists at the targetUrl location.
  • skipSourceFolderName: If the source is a folder, the no new folder with the name of source folder will be created. Only the contents inside the folder will be copied.
  • requires connection to a SharePoint site

For more information see the Copy-PnPFile cmdlet

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions