Re: Best way to delete user files and folders that won't delete?
In news:uYTbx49oIHA.5096@TK2MSFTNGP02.phx.gbl,
boe <boe_d@hotmail.com> typed:
> Thanks - I'll give that a try the next time this happens!
Boe,
Actually I've seen this in the past a few times when a machine gets 'pubbed'
by FTP pubbers that seek open FTP servers that allow anonymous and write
permissions. They then use the server to create folders using a non-Windows
FTP client, or an FTP client that is set to use Unix commands then upload
their wares, such as movies, apps, games, etc, then advertise them on
private 'pub' sites to share with others in their pirate community. They can
then create folders with reserved Windows names (com, net, LPT1, etc) that
you can't normally in the Windows GUI. All they do is post the whole
subfolder structure on their pub sites and they directly access them. It's
supported on Windows to be compatible with POSIX (from the days of old) and
Unix. And yes, OSx can do this too because they are BSD based, which is
Unix.
Here's an excerpt from a post I saved long ago to help you remove these
files:
------------------------------------
Here's how to create a locked folder with FTP:
http://www.madchat.org/coding/w32nt.rev/dirnt.htm
Here's how to delete them:
How to Remove Files with Reserved Names in Windows
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q120716
++++++++++++++++++
It's likely the files are using an alternate data stream which would
explain why their file size appears as zero bytes.
In order to erase the files, try this -
del \\?\c:\<filename>
If the filename contains symbollic characters, enter what you can and
wildcard the rest or use file completion or use a full wildcard.
You are correct in that this has been answered before, one solution has
been posted below and searching fazwak for posts from me containing \\?\
will also yield many results. IMHO, the easier built-in solution which
uses a form of local naming is more often readily available ... (I'm
assuming the top level folder contains absolutely nothing you want to
keep, if it does .... improvise on the syntax I supplied and erase each
unwanted child) -
C:\>cd inetpub\ftproot
C:\Inetpub\ftproot>rd /s /q \\?\c:\inetpub\ftproot
NOTE - The syntax is literal, do not substitue the ?, only the path. In
addition, setting your working directory to inetpub\ftproot merely
prevents it from being erased along with it's contents.
(By Dean Wells, MVP)
----------------------------------------
--
Regards,
Ace
This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.
Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT,
MVP Microsoft MVP - Directory Services
Microsoft Certified Trainer
For urgent issues, you may want to contact Microsoft PSS directly. Please
check
http://support.microsoft.com for regional support phone numbers.
Infinite Diversities in Infinite Combinations