Discussion:
Deleted Files
(too old to reply)
will f
2006-07-22 15:05:00 UTC
Permalink
Greetings.

Can anyone tell me how Windows deletes files? I know that the file is
somehow marked. Does that mean the file's entry in the file allocation table
is marked, or is the file itself marked with some kind of token character
that's added to the beginning of the file? What is the character that is
used for marking the file? Is the character added to the file, or it is
added to the beginning of the file name?

Does Microsoft document Windows' file deletion mechanism anywhere, and is
there an API that can be used to find these marked files?

Any help is appreciated.

Thanks.

- will f
Stephen Howe
2006-07-25 14:06:17 UTC
Permalink
This post is off-topic.
The newsgroup is for Visual BASIC for DOS.
Post by will f
Can anyone tell me how Windows deletes files? I know that the file is
somehow marked.
You don't know that. It is property of the file system rather than Windows.
That was true for FAT but not necessarily true for subsequent file systems
(FAT32, NTFS)
Post by will f
Does that mean the file's entry in the file allocation table
is marked, or is the file itself marked with some kind of token character
that's added to the beginning of the file? What is the character that is
used for marking the file? Is the character added to the file, or it is
added to the beginning of the file name?
For FAT, the character marked the files directory entry as deleted.
The clusters that make up the file were marked as unallocated.
So whether you get back the original file depended on whether those clusters
were used for some other subsequent file. If so then tough luck - the file
is gone, all you have is the directory entry which tells things like file
size, last modified date, etc.
Post by will f
Does Microsoft document Windows' file deletion mechanism anywhere, and is
there an API that can be used to find these marked files?
See above

Stephen Howe

Loading...