Programming:Undo delete of file

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 02:40, 16 April 2010 by ZilogMonkey (Talk | contribs)

Jump to: navigation, search

If you accidently delete a file from disk, there is a way to make it visible again.

Important! Don't not save anything to disk after deleting because it will be impossible to recover your files then.

type this:

poke &a701,229
cat

now you will see all the deleted files that are still stored on the disk. you can load" a basic file, then type

poke &a701,0
save"filename

and it will be saved again.

For other non-basic files you'll have to use a disc tool like discology.


This is how it works:

This poke does the same as the |user command from amsdos. The |user command can only access user 0 to 15.

When you delete a file mit |del, AMSDOS rewrites the user level of the file with number 229. So, when you change to this level, you will see the deleted file again.