If it was DOS, there was a command called "undelete" that if used immediately, restored the file as such or in chunks that users could combine. However, with the complex operating systems, recovering deleted files on Windows XP needs some programming/codes to find the position of the deleted file and to retrieve the data. As everyone is not an expert, there are plenty of tools available that help in file recovery. These tools can be freeware, free to try (shareware), or paid software.
One such freeware is Restoration Freeware. Being a freeware is an advantage in itself. However, its functions are also worth using, and it isn’t very high size program either. It is just 406 kb, and it may easily fit your floppy drive, however, you may like to run it from your hard disk. It is better to run it from hard disk, and keep a floppy/CD as a back-up option.
Another tool is File Scavenger Data, available for download from CNET at a cost of USD49. The tool is easy to use and like the above mentioned Restoration software, is easy to use and does not use much memory. It runs on all versions of Windows and cannot be used from the command line. However, it does recover recently deleted files among which, you may locate the accidentally deleted file provided it has not been over-written.
While the above tools are for individual use, you may use Bart PE Disk Recovery for commercial use too. Bart PE is actually a collection of software tools that helps in several system tasks apart from data recovery.
Finally, if nothing works, you may have to call in systems expert who may help you retrieve data using sophisticated programs. Even then, no one can guarantee hundred percent data recovery unless your computer was not used at all after you deleted that important file that you want to recover.
Note: To avoid such circumstances, it is advisable to go for regular backups. There are plenty of online backup tools that also offer continuous backup at every few minutes. If you are using any of such program, you need not worry about recovery of data as you would have a recent copy stored online. I would recommend using Idrive online backup that offers free continuous backup up to 2GB of data. For large data, they charge a nominal fee. However considering the loss in case of you not being able to recover data from deleted file, the fee is worth it, as the tool backs up newer version of files as soon as it detects one.