Hey guys,
We were unable to populate our metadata named "Folder" when calling spo file add (probably conflicts with the predefined --folder parameter):
spo file add --webUrl URL --folder 'docLibName' --path FILE --Folder 'metadataValue'
Workaround was to use another metadata name, not sure if this is something worth fixing.
Thanks!
Thank you for reporting this @munchkin1, we will take a look and get back to you.
Does the command throw an error when using ‘—Folder’? If so, can you supply the full error message.
What is the observed behaviour when using ‘—Folder’?
No error message is thrown, it appears to ignore the extra --Folder parameter. After the command is ran my Folder column remains empty.
Just to double-check, if you would run the command with the --debug option, can you see the Folder field included in the request or is it skipped altogether?
Confirmed with --debug option, the Folder field is not found in the debug output
Thanks for confirming. Let me have a look if there is a way for us to address it.
OK, so this seems to be an issue in the command, where we first convert all options to lowercase, before removing all known options from the passed arguments. That makes folder and Folder be the same and getting removed from the properties to be set on the file. We should be able to address this issue by removing the lowercase conversion.
Fix for this issue has been included in the latest beta of the CLI which you can get from npm i -g @pnp/office365-cli@next. Once again, thank you for reporting @munchkin1.
Most helpful comment
Confirmed with
--debugoption, theFolderfield is not found in the debug output