DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Utility to remove file/folder from directory.  (Read 12,515 times)

nickedw

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 1
Utility to remove file/folder from directory.
« on: January 16, 2010, 08:34 PM »
A folder is corrupt/infected and points to itself. So subfolder is its own parent. Utility could just purge entry from directory table. Then Diskchk can be used to fix misallocations.

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: Utility to remove file/folder from directory.
« Reply #1 on: January 17, 2010, 03:32 AM »
How did this happen? Which filesystem? You're mentioning "infected" - is it possible that the disk structure is OK, but self-pointing is done by a (rootkit) driver?

Poking directly at the file structures isn't something for the faint of heart, especially not if we're talking NTFS which is largely undocumented... and you definitely don't want to do it on a mounted filesystem :)
- carpe noctem

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: Utility to remove file/folder from directory.
« Reply #2 on: January 03, 2012, 02:14 AM »
A folder is corrupt/infected and points to itself. So subfolder is its own parent. Utility could just purge entry from directory table. Then Diskchk can be used to fix misallocations.
You aren't referring to the C:\ProgramData\Application Data in Windows 7 by any chance? This is a (multiple) redirected folder that points to itself (I don't know why, but MS thought it was a good idea). It may be because C:\ProgramData\ is a target of C:\Users\All Users, so legacy apps that use "C:\Users\AllUsers\Application Data" get pointed to C:\ProgramData folder.
There are a lot of redirected folder in Vista/7 (and some even in XP), but I think only Vista/7 have ones that point to themselves.
Cheers

Original address: https://www.donationcoder.com/forum/index.php?topic=21392.0