Re: FileCopy overwrites the existing file



If I were writing CopyFile, I'd open the existing file for writing. That
means I'm overwriting the same sectors with new data, and the old data
disappears for good.

Well, I think you are much too optimistic....

In order to make sure that it all works the above way, you would have
to be a file system writer - as CopyFile() writer you would have no
control over these things whatsoever...

Anton Bassov


Tim Roberts wrote:
gtea <gtea@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have a question about the use CopyFile() function from the Windows API. if
the Boolean flag sets to false and new file already exists, the function
overwrite the existing file and succeeds. In this case, does the contents of
copied-to file (before overwriting) still exist on the hard driver somewhere
and can be retrived using some type of trieval software?

If I were writing CopyFile, I'd open the existing file for writing. That
means I'm overwriting the same sectors with new data, and the old data
disappears for good.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages

  • Re: FileCopy overwrites the existing file
    ... disappears for good. ... to be a file system writer - as CopyFilewriter you would have no ... in case of overwriting the same sectors. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Reformatted, lost data. Can I get it back?
    ... Reformatting just rewrites master boot record, the sector map, renumbers the sectors and marks them as available, and so on. ... overwriting the data does not change 100% of the magnetic particles in the surface of the HD: ... Because traces of previous data remain, it's possible to recover the data, but it takes technology and expertise that are not easily available. ...
    (microsoft.public.windowsxp.general)
  • Re: What does delete really do?
    ... and/or related techniques. ... That would depend on whether the OS saves the new file by overwriting any ... and marked the original space as unoccupied. ... But let's say it did overwrite the same sectors used by the original. ...
    (microsoft.public.windowsxp.general)
  • Re: FileCopy overwrites the existing file
    ... overwriting large file is quite expensive and if I had to do it, ... I've seen a software that allows a user to overwrite the sectors up ... overwritten once with zeros. ... I wouldn't assume such recovery is a regular offer. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: FileCopy overwrites the existing file
    ... I have a question about the use CopyFile() function from the Windows API. ... the Boolean flag sets to false and new file already exists, ... copied-to file (before overwriting) still exist on the hard driver somewhere ... If I were writing CopyFile, I'd open the existing file for writing. ...
    (microsoft.public.win32.programmer.kernel)