Computing.Net > Forums > Programming > When programs delete files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

When programs delete files

Reply to Message Icon

Name: p64
Date: May 17, 2009 at 03:33:27 Pacific
OS: Windows Vista
Subcategory: General
Comment:

So when you delete a file, it goes to the Recycle Bin,
and when you empty the Recycle Bin the computer just
forgets where it put it and marks that space OK for
storing new files.

But when a program/application deletes a file (for
example a temporary file to make the program work),
what happens to it? Does it get completely wiped or
does it go to the same place as a file emptied from the
Recycle Bin?

Thanks in advance for any help.



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: May 17, 2009 at 05:21:25 Pacific
Reply:

Generally speaking temporary files created by applications do not go to the recycle bin, they are just deleted. If temp files were sent to the recycle bin then the bin would fill up pretty fact with files that were of no use.

The only difference between sending a files to the recycle bin and deleting it completely is the way the directory entry is updated. In neither case is that data actually touched. In both case it is just a metter of changing a few bytes on the hard disk.

In the case of a file going to the Recycle Bin the information in the directory is just changed to reflect its new location. In the case of a complete delete the directry entry is marked as free and the space the file uses is marked as available and it remains intact until something else comes along and overwrites it.

Stuart


0

Response Number 2
Name: p64
Date: May 17, 2009 at 08:16:17 Pacific
Reply:

OK, thank you very much for the quick reply.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: When programs delete files

Batch File deleting files by date? www.computing.net/answers/programming/batch-file-deleting-files-by-date/15581.html

Delete Files Older Then x-Days www.computing.net/answers/programming/delete-files-older-then-xdays/15229.html

Batch file to delete files in a dir www.computing.net/answers/programming/batch-file-to-delete-files-in-a-dir/14599.html