The Server Pages


TheServerPages Articles





Removing Filenames and Directories That Have No Name

Author: Wojjie     Posted: 2005-02-18     Viewed: 15,627


Operating an open ftp server can be a risky ordeal, expecially if anonymous users may upload files to it. There are people out there that scan blocks of ips for such open servers and may use it to store illegal software, some of who may use tricky folder names such as ' ' (space). This quick article will explain how to remove such a folder/file on a Windows machine.

1. Empty out the folder in question (if it is a folder). You should be able to do this with explorer
2. Open 'Command Prompt' by:
clicking 'Start' -> click 'Run' -> type 'cmd' (without the quotes) -> hit the 'Enter' key
3. Navigate through the command prompt to the folder containing the offending folder/file.

If the path of the offending folder/file is "C:\path\to\folder\" then you can type: "cd \path\to\folder\" and hit 'Enter'.
4. Find the short name for the folder/file by using the command 'dir' with the parameter /x.

dir /x

Example of a short name:
5. Use this short name to remove the folder/file.

If it is a file with the short name '0200~1':
del 0200~1

If it is a folder with the short name '0200~1':
rmdir 0200~1


Copyright © 2004-2015: