Search

Remove-Item does not work on 8.3 SFN with a dot and 4 characters as second set by Matthew L

Active

1
0
Sign in
to vote
Type: Bug
ID: 776317
Opened: 1/11/2013 3:07:54 AM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
When trying to do a Remove-Item on a 8.3 SFN that has both a dot (.) and the second set of characters is 4 length, it fails. We noticed this when a users local cache renamed to USERNAME.XXXX after trying to delete. (where XXX is usually the domain name, ours is 4 characters in length)

For example:
Create a folder called "test.test", then try to run in powershell - Remove-Item TEST~1.TES - this will fail everytime. As a workaround you can do - Get-Item TEST~1.TES | Remove-Item


However, more interestly.... if you create a folder called "test.domain" and try to Remove-Item, it will work. But if you create "test.doma", and try it, it will fail. Even though the SFN is the same! "TEST~1.DOM"
Details (expand)
How often does this happen?
Always Happens

Have you seen this problem before in this product?

Yes, this happens in previous released versions
Reproduction Steps
PS C:\temp> mkdir TEST.TEST


    Directory: C:\temp


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         1/11/2013 12:05 PM            TEST.TEST


PS C:\temp> Test-Path TEST~1.TES
True
PS C:\temp> Remove-Item TEST~1.TES
Remove-Item : An object at the specified path C:\temp\TEST~1.TES does not exist.
At line:1 char:12
+ Remove-Item <<<< TEST~1.TES
    + CategoryInfo         : InvalidArgument: (:) [Remove-Item], PSArgumentException
    + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RemoveItemCommand

PS C:\temp> Get-Item TEST~1.TES | Remove-Item
PS C:\temp> Test-Path TEST~1.TES
False
PS C:\temp>
Expected Results
That "Remove-Item" should work on all 8.3 SFN
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.