question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New command: add file

See original GitHub issue

Upload 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:closed
  • Created 6 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

3reactions
VelinGeorgievcommented, Sep 14, 2018

@waldekmastykarz , please assign me, I need that completed to finish a blog post of mine 😃

2reactions
VelinGeorgievcommented, Oct 18, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found