Cli-microsoft365: File does not exist error when filename contains # character

Created on 16 Feb 2020  路  5Comments  路  Source: pnp/cli-microsoft365

Description

I'm trying to move some files and delete some other files in sharepoint online site collection using cli. Where ever the filename contains # character I get an error that file does not exist.
It works fine for filenames that don't have # in them.

Steps to reproduce

  1. Upload a file with # in its name for e.g "test # document.docx"
  2. check for the file using spo file get [options]
o365 spo file get --webUrl https://mycompany.sharepoint.com/sites/site1 \
    --url "/sites/site1/Documents/WIP Docs/test # document.docx" 

Expected result

Should get meta data of the file.

Actual result

Error: The file /sites/site1/Documents/WIP Docs/test # document.docx does not exist.

Environment

OS: macOS Mojave Ver 10.14
o365 version: 2.6.0
shell: zsh 5.4.1 (x86_64-apple-darwin16.7.0)

bug work in progress

Most helpful comment

Thanks @waldekmastykarz. Looking forward to the next release with the fix.
On a side note, I'm really liking using office365-cli. Fantastic tool, especially for automation. Keep up the good work. 馃憦

All 5 comments

Thank you for reporting this @codifyer 馃憤馃徎

We are sorry for the trouble, we will look into this ASAP.

Hi @codifyer, thanks for reporting the bug. I was able to reproduce it and submitted a fix which should be included in the next preview version. Once again sorry for the trouble and appreciate your help 馃憦

Thanks @waldekmastykarz. Looking forward to the next release with the fix.
On a side note, I'm really liking using office365-cli. Fantastic tool, especially for automation. Keep up the good work. 馃憦

Thank you! Appreciate the kind words 馃槉

We have just released a new preview version with the fix. You can install it using npm i -g @pnp/office365-cli@next. Once again thank you for reporting the issue 馃憦

Was this page helpful?
0 / 5 - 0 ratings