Link to home
Create AccountLog in
Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

Avatar of mikedehaan
mikedehaan

Removing a directory
This question is regarding my FTPRoot folder under "C:\INetPub"

It seems as though my machine has been hacked into at one point and someone has placed rather large files in my FTPRoot folder.  When trying to delete these files, I get the error "Operation not permitted" or "Access Denied".  Is there a way to drop the directory node and just get ride of the whole tree?  I don't care about losing anything under that directory, but I cannot loose the whole drive.

This question is also posted under the Linux Section.

-M

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of cmarandicmarandi🇺🇸

Take ownership of the folder and everything underneath it first... and then you should be able to delete it...
While there, you can also take a look at the security of the folder and see what user ID has full rights on it... it may lead to the culprit.

Avatar of cmarandicmarandi🇺🇸

Ownership by the way, is by right clicking the folder and choose property, then choose security.

ASKER CERTIFIED SOLUTION
Avatar of jkrjkr🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of mikedehaanmikedehaan

ASKER

jkr,

With your post I was able to remove the majority of the junk, but I'm still getting errors when trying to remove "C:\INetPub\FTPRoot\com1".

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


It says "The system cannot find the file specified"

Avatar of jkrjkr🇩🇪

Doesn't

RmDir \\.\C:\INetPub\FTPRoot\com1 /s /q

work?

I've typed it exactly as you have shown and it does not work (and yes, those are my exact directory names case and all).  I did an "chkdsk /f" and rebooted.  It fixed a whole bunch of nodes areter the original delete, but it didn't effect this one.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Ok, this worked:

RmDir \\.\C:\INetPub\FTPRoot\com1~1 /s /q

Thank you, everyone, for all your help.

Your prompt, accurate answer was greatly appreciated.

Avatar of jkrjkr🇩🇪

Thank you :o)

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.