1
Running under Windows 7 Enterprise SP1 x64.
When I try to create a folder with a certain name (for reference, let's assume it's X:\MyFolder
, I'm getting this:
The name I am using does not show as a folder in Explorer, Total Commander or Far.
The name consists of Latin characters and an underscore, <20 characters long, being created under a drive's root (so no long names issue).
Any other folder name works fine.
I tried restarting - it did not help.
I tried a check disk - it did not find any errors.
What could be preventing me from creating a folder with this name?
Is there any other cleanup I can do on my file system, to get rid of this ghost somehow?
For those wondering, this is not a random name, it was destination path for Copy-Item
command in Powershell, it failed to create this folder for some reason, now it keeps haunting me. :) The issue has been happening ever since, and only for this specific folder name, at this specific path.
Could you post the PowerShell code for us to have a look at it? – Darius – 2014-01-06T21:17:10.777
@Darius: I don't have this code anymore. But the statement that caused this behavior was trying to copy into a folder which did not exist. I forgot about a
-Force
statement, then I found that-Force
does not work for files, only for folders, so I went with a different approach. I did not use source control, unfortunately. And I am not even sure if the issue is Powershell related - I cannot reproduce it. :) – Neolisk – 2014-01-06T21:23:37.643So the earlier part of the PowerShell code was supposed to create a folder and then copy some "stuff" into it? – Darius – 2014-01-06T21:28:59.533
@AxelKemper: You are right. Time to end my working day and get some sleep I guess. I deleted a file with the same name (not sure how it got there though), now it's fine. Please post as an answer to be accepted. – Neolisk – 2014-01-06T21:30:13.910
@Darius: Correct. And somehow instead of copying stuff into a folder, it created a file with this folder's name (and no extension). See Axel's comment. – Neolisk – 2014-01-06T21:31:05.210
Yeah, I can repo the problem and I think I know what was wrong with the code. It was taking the whole file name with its extension and trying to apply that to the folder name which resulted in the error message you posted in you question. – Darius – 2014-01-06T21:40:42.260