Deleted files

Everything else that doesn't fall into one of the other PB categories.
spacebuddy
Enthusiast
Enthusiast
Posts: 347
Joined: Thu Jul 02, 2009 5:42 am

Deleted files

Post by spacebuddy »

In Windows, when you delete a file it is actually not really deleted from the drive.

So, if I delete a file that is 2G and my hard drive only has 2G free, then
I create a file that is 2G, is the file really deleted now? :D
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Deleted files

Post by rsts »

If you write to all bytes of the 2 gb new file you created, recovery of the old file becomes more difficult.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Deleted files

Post by PB »

.
Last edited by PB on Thu Jun 26, 2014 9:16 am, edited 1 time in total.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
BorisTheOld
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Apr 24, 2012 5:08 pm
Location: Ontario, Canada

Re: Deleted files

Post by BorisTheOld »

@spacebuddy

There's no guarantee that all your old data will be overwritten.

The OS may have allocated and deallocated part of the 2G for other purposes between you deleting the old file and creating the new file. So you may not be overwriting all of the sectors originally used by the old file. Some of your old sectors might now reside, unchanged, in files belonging to another task.

If security is your concern, you're better off to overwrite the file with garbage data before you delete it.
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
Post Reply