![]() |
|
#1
|
|||
|
|||
How to remove a file that prevents recovery in C++Hi, i have been given an assignment to do as above.. but have completely no idea where to start. Any1 have any idea ? hints or something.. if so please let me know and thank you in advance
Regards Tom |
|||
|
#2
|
|||
|
|||
Re: How to remove a file that prevents recovery in C++I can only assume that you are doing this on Windows where file reclamation is the norm anymore.
So, the question may not be whether the file can be reclaimed, but what are the contents of what is reclaimed. My suggestion would be to determine the length of the file, followed by opening it, overwriting its contents with an innocuous pattern, followed by deleting it. There are parts of this solution which may be a bit naive, but it's easy to implement, & it is portable. Depending upon the file's history, blocks of its previous contents may still reside on the drive. If you want to ensure that the file & all other deleted files are thoroughly deleted, then you will need to research what I/O functions are provided by the operating system, & zero out all unused blocks. Note that this is a more sophisticated approach, but it is operating system specific. |
|
#3
|
|||
|
|||
Re: How to remove a file that prevents recovery in C++Thanks for replying ocicat .. i think thats what i need
For the first solution, i read about it somewhere but not sure if its safe or complete removal. The second solution, too low level for me lol... im still new to programming so it will be really hard T_T |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| After execution - Error cannot locate /Skin File? | WSCH | C++ Forum | 1 | 05-Mar-2005 21:03 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
| CD Buring Failed | skanth2000 | Computer Hardware Forum | 1 | 15-Nov-2003 04:52 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The