First and most important thing is proper power backup. Your computer should have that much backup which can help it in properly shut down the system. When working in network environment it becomes more important.
Second and even more important take proper and regular backup of your important back. Multiple and increasing backup method is best and frequency of backup is determined on volume of your data you can easily enter from your last date of backup.
But your data is corrupt and files are damaged now what to do.
When you have accidentally deleted the files.
If your files are deleted from recycle bin then there are chances that you can recover data from computer with help of any data recovery software. This is because when we delete certain files from computer then they are not actually deleted even after you remove from recycle bin. Windows mark those files as free space and when you write some thing new on computer then there is possibility that those areas can be overwritten by new files and your deleted data files can be erased fully or partially.
So the first thing to do is never write any thing on that hard disk where files are deleted and you have plan to recover it with some data recovery software.
Attach that hard disk to another system and install data recovery software on that machine and then try to recover those files.
Three tips of increasing success of your data recovery are also saying this.
You can also see some Do's and Don'ts of data recovery at this page.
Here is Beginners guide for hard disk data recovery at PCStats which makes us understand the fundamentals as well as guides about softwares to recover data.
You can try this file for NTFS get data back to recover data. But do it on your own risk.
Related posts : Data recovery some tips and tricks