You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2021. It is now read-only.
###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###
Are you using Apply-SPOProvisioningTemplate or Get-SPOProvisioningTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.
Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
Please confirm what it is that your reporting
When trying to remove a file with a # or a %, the lookup fails.
Expected behavior
Please describe what output you expect to see from PnP-PowerShell Cmdlets
$FileToDelete = "/sites/teamTest/Shared Documents/Infrastructure/1#1.jpg"
Remove-PnPFile -ServerRelativeUrl $FiletoDelete -Recycle
Running the above, I would expect it to delete the file as requested.
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
Here is what I run:
$FileToDelete = "/sites/teamTest/Shared Documents/Infrastructure/1#1.jpg"
Remove-PnPFile -ServerRelativeUrl $FiletoDelete -Recycle
When I run this, I get the following:
Confirm
Delete '1'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y
You'll notice that it stops processing the file name at the # and is therefore unable to find the file to delete it. (If the filename is #1.jpg , then it ends up deleting the whole folder which I found out painfully.)
When I ran across this, I decided to do some more testing. Here is what I discovered:
###Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:###
Apply-SPOProvisioningTemplate
orGet-SPOProvisioningTemplate
? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/officedev/PnP-Sites-Core/issues.Reporting an Issue or Missing Feature
Please confirm what it is that your reporting
When trying to remove a file with a # or a %, the lookup fails.
Expected behavior
Please describe what output you expect to see from PnP-PowerShell Cmdlets
$FileToDelete = "/sites/teamTest/Shared Documents/Infrastructure/1#1.jpg"
Remove-PnPFile -ServerRelativeUrl $FiletoDelete -Recycle
Running the above, I would expect it to delete the file as requested.
Actual behavior
Please describe what you see instead. Please provide samples of HTML output or screenshots
Here is what I run:
$FileToDelete = "/sites/teamTest/Shared Documents/Infrastructure/1#1.jpg"
Remove-PnPFile -ServerRelativeUrl $FiletoDelete -Recycle
When I run this, I get the following:
Confirm
Delete '1'?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y
You'll notice that it stops processing the file name at the # and is therefore unable to find the file to delete it. (If the filename is #1.jpg , then it ends up deleting the whole folder which I found out painfully.)
When I ran across this, I decided to do some more testing. Here is what I discovered:
Filename | Return Output | Allowed in NTFS
Filename | Return Output
1#1.jpg | 1
1%1.jpg | 1%251.jpg
1+1.jpg | 1+1.jpg
1,1.jpg | 1,1.jpg
1&1.jpg | 1&1.jpg
You can see that it appears to be an issue with # and % (where it adds additional characters).
Steps to reproduce behavior
Please include complete code samples in-line or linked from gists
$FileToDelete = "/sites/teamTest/Shared Documents/Infrastructure/1#1.jpg"
Remove-PnPFile -ServerRelativeUrl $FiletoDelete -Recycle
Which version of the PnP-PowerShell Cmdlets are you using?
What is the version of the Cmdlet module you are running?
(you can retrieve this by executing
Get-Module -Name *pnppowershell* -ListAvailable
)3.2.1810.0
How did you install the PnP-PowerShell Cmdlets?
The text was updated successfully, but these errors were encountered: