New command: add file
See original GitHub issueUpload file to the specified folder
- command:
spo file add -w|--webUrl <webUrl> -f|--folder <folder> -p|--path <path> -c|--contentType [contentType] --checkOut --checkInComment [checkInComment] --approve --approveComment [approveComment] --publish --publishComment [publishComment] ... - webUrl: The URL of the site where the file should be uploaded to
- folder: server- or site-relative URL to the folder where the file should be uploaded
- path: local path to the file to upload
- contentType: content type name or ID to assign to the file
- checkOut: if versioning is enabled, this will check out the file first if it exists, upload the file, then check it in again
- checkInComment: comment to set when checking the file in
- approve: will automatically approve the uploaded file
- approveComment: comment to set when approving the file
- publish: will automatically publish the uploaded file
- publishComment: comment to set when publishing the file
- …: this command should allow using unknown properties. Each property corresponds to the list item field that should be set when uploading the file. Command properties should be excluded from the SharePoint request
- requires connection to a SharePoint site
For more information see the Add-PnPFile cmdlet
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
Create files via the command line - OpenClassrooms
You can create all types of files from the command line itself. ... This new file will have a different extension than the...
Read more >How to Create and Delete Files and Directories from Windows ...
1. Open the Command Prompt. The easiest way to do this is to press Win + S to activate the search bar, type...
Read more >How to Create a File in Linux Using Terminal/Command Line
In this Tutorial Learn how to create a Linux file from the command line. Creating a file in Linux is easy with these...
Read more >How to Create a File in Linux
To create a new file run the cat command followed by the redirection operator > and the name of the file you want...
Read more >New File Command - Visual Studio (Windows) | Microsoft Learn
Creates a new file and opens it. The file appears under the Miscellaneous Files folder. Syntax. cmd. Copy.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@waldekmastykarz , please assign me, I need that completed to finish a blog post of mine 😃
Hi @waldekmastykarz,
I do, but even with the code from Robert I still have to do a fair bit of work.
I am working to ensure the folder tree that is specified for the folder options exists and also have to implement list item values specification.