Rather than finding out how to undelete files, it is of course better to prevent important file from being deleted in the first place. By default file in Vista can be deleted by the owner of the file, which makes a lot of sense in itself. But when you, or someone else using the same computer, accidentally deletes an important file, you might wish deleting a file had not been possible in the first place.
When you look at the file properties of a file in Vista, you can see the the file attributes under the General tab, which has a Read-only option.
This checkbox allows the user to indicate that the file is not to be modified. So when you open the file, make changes to it and try to save it, that will not be possible.
But this read-only option will not prevent the file from being deleted! If you mark the checkbox, and then try to delete the file, you can.
To really prevent the file from being deleted, you need to access the Security tab in the file properties window. If the tab is not visible, press Alt to access the menu, then select the Tools menu and click Folder Options. Now select the View tab, and deselect the checkbox named Use Sharing Wizard (recommended) or named Use simple file sharing (Recommended). Click OK to confirm the changes.
Within the Security tab, you will see the groups and user names for which security information is available. The lower half of the window shows the actually permissions for the selected user or group.
To change the permissions for a group or user, select the Edit button. This will bring up the security window, where you can select the group or user for which you want to change the file permissions.
If the user is not shown, you can use the Add button to select a network or computer users.
Now select the user or group for which you want to change the permissions so they cannot delete your file. Then make sure that they only have the Read &execute, Read, and Write options enabled. The Full control and Modify checkboxes should not be selected as they control the option to delete a file.
Click OK to confirm the change of permissions.
That’s it, the users or groups you have changed can see your file, and open them, but they can no longer delete the file!
Keep in mind that a user with administrative priviliges can always change the permissions again and still delete the file. So even though this is a good way to help prevent accidental deleting of files, it is always best to make a backup of your important files.