In the Internet cafe a few days ago, use flashget to download msdn webcast and save it to a new folder.
Go home and open it. You can see that each folder has two identical names. The two folders with the same strange names exist in one folder.
Go to the folder and find that the downloaded items are invisible... a headache.
There is no way to delete one of the two folders with the same name, and then enter another folder, and find that the downloaded content appears.
The files inside cannot be opened directly. However, the files can be copied out. The files are returned, but the remaining directories cannot be deleted.
Helpless! Prepare to keep these folders, copy other files, and format the hard disk! A gb hard disk is filled with headaches ..
I saw an article in the blog that day.Article<A bug almost caused the file system on the server to crash.>. In the command line, enter
> RD/s \\? \ L: \ modern C # series courses
RD/s \\? \ L: \ intel processor platform development series courses
Actually deleted.
Although my folder does not end with a space, it is strange! This method is not only used to delete folders with spaces.
Thanks again
Note:
Windows command line tools del and RD support one way to check the validity of the input file name, which is to add\\? \
For example
Del "\? \ C: \ temp \ XXX. "delete XXX. This file
Delete a directory
RD/s "\? \ C: \ temp \ XXX. "delete the XXX. Directory
After executing this command, you can delete these weird files. Note: You must enter the complete directory. The relative path is not supported.
Create a directory with spaces:
Try
{
String dir = @ "C: \ temp \ ABC ";
System. Io. Directory. createdirectory (DIR); // create the ABC directory under the c: \ Temp Directory
String dir1 = @ "C: \ temp \ BCD \";
System. Io. Directory. Move (Dir, dir1); // move ABC to the "BCD" directory. Note that there is a space behind BCD.
}
Catch (exception ex)
{
MessageBox. Show (ex. message, "error", messageboxbuttons. OK, messageboxicon. Error );
}