I got some folders created by malware whose name ended with a dot like C:\a.\
or C:\b.\
, etc.
I found a solution that can remove such folder with command rd /q /s "C:\a.\"
but if I call win API RemoveDirectory
, it returns ERROR_FILE_NOT_FOUND
.
And I just wonder how to write a function to delete such directory, thanks
I test on my own Windows XP SP3 system like this
create a folder C:\>mkdir a..\\\
and I cannot double click to access this folder. and I can remove with command rd /q /s "C:\a.\"
what Windows system API(s) that rd /q /s
command call?
This naming convention comes from Unix-like operating systems (such as Linux or OSX) where it means a hidden file or directory. It works anywhere, but its primary use is to hide configuration files in your home directory (i.e. ~/. cache/ or ~/. plan) They are frequently called dot files.
5 Answers. As far as I know there are no issues with naming folders and files with a single or multiple dots.
Open My Computer or Windows Explorer. We recommend you make sure the directory or folder is empty before proceeding, unless you intend to delete everything in it. Locate the file or folder you want to delete and right-click it. Choose the Delete option from the pop-up menu.
Here's a solution to this problem:
rd /s "\\?\C:\Documents and Settings\User\Desktop\Annoying Folder."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With