Can't delete folder with spaces
When creating a folder "foldername " (with spaces at the end!) using the mkdir function, I can't delete it afterwards, not even with rmdir.
I think the problem is the C++ runtime library that does not prevent such folders to be created (but I can't make one with my mouse and keyboard ^^).
Is there a way (or a tool) to delete it anyway (file system is NTFS) or do I really have to search for a Linux Live-CD ???
Yes, it is empty.
I could imagine just erasing the folder entry on the hard disk, but I don't know much about it (don't wanna risk to crash the disk).
I could imagine just erasing the folder entry on the hard disk, but I don't know much about it (don't wanna risk to crash the disk).
Just a thought, but if you get a command prompt to the directory the directory is in and do
dir /x
that will give you the old DOS name for the directory, which will not have spaces in, like Program Files is progra~1 for example.
You may be able to pass that name as an argument to the rmdir() function and it may work. Not really a long term solution.
I wasn't quite clear - are we talking about a rmdir() C/C++ function or the rmdir DOS command?
dir /x
that will give you the old DOS name for the directory, which will not have spaces in, like Program Files is progra~1 for example.
You may be able to pass that name as an argument to the rmdir() function and it may work. Not really a long term solution.
I wasn't quite clear - are we talking about a rmdir() C/C++ function or the rmdir DOS command?
Well when you navigate to such directories in cmd you have to do:
cd c:/docume~1
So try something like that, pass the name of the folder by passing the first 6 letters and then ~1, ~2 if you are trying to remove the second of two entries with the same first 6 letters.
Dave
cd c:/docume~1
So try something like that, pass the name of the folder by passing the first 6 letters and then ~1, ~2 if you are trying to remove the second of two entries with the same first 6 letters.
Dave
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement