I think anyone who has used computers for any length of time has been where you are now. I know I have, and on more than one occasion.
The answer to your question is “maybe”. It depends on a lot of things.
Become a Patron of Ask Leo! and go ad-free!
Stop — just stop
First, and this is important, stop using the disk that had the file.
To increase the likelihood that the file can be recovered, stop doing things that write to the disk.
That includes leaving your programs running, since many write to the disk as they exit. It also means not browsing the internet, since the browser writes to disk as you browse.
First things first: look in the Recycle Bin.
If you deleted the file using Windows File Explorer (or many of the standard Windows controls), the file might not actually be deleted. Instead, it might just have been moved into the Recycle Bin.
If you find it there, right-click on it and click on Restore to move it back to wherever it was originally. Move it out now, because if the Recycle Bin is emptied, the file is truly deleted, and things get harder, as we’ll see next.
If your file wasn’t recycled — perhaps because you deleted it in a Command Prompt, some other program deleted it, or you were holding the SHIFT key down when you deleted it in Explorer — this is referred to as a “permanent” delete. However, it might still be recoverable.
Deletion does not overwrite the data in your file. All it does is say “OK, this disk space over here, that used to be a file? You can use it for other things now.”
The contents of a file don’t disappear until it’s overwritten by something else. That’s why it’s so important to stop doing things to the disk that contained the file. Any writing to the disk after you’ve “permanently” deleted a file could overwrite its contents.
There are many “undelete” utilities available. A Google search on “undelete files” returns a long list of utilities. I currently recommend Recuva, which will scan your disk and display all the files that can be recovered.
Remember that I said don’t write to the disk? Search for and download an undelete utility using a different computer entirely, and use a USB thumb drive or other media to take it to the computer experiencing problems. If you can run it from the USB drive directly, that would be ideal since actually installing it would write to the hard disk, something we’re trying hard to avoid.
If you’re lucky and you haven’t written anything to the hard disk since the file was deleted, the undelete utility may be able to recover it for you. If you have been using the disk, then it’s an unpredictable roll of the dice. It depends on how much has been written to the disk, where on the disk it was written, and where on the disk your now-deleted file used to reside. It might work. It might not.
Big (expensive) guns
There is one, last, hope — but it’s expensive, time-consuming, and really only for the most dire of circumstances.
It is sometimes possible, using advanced data recovery techniques, to recover data even after it’s been overwritten. It requires special equipment and techniques, so you would send your hard drive to a data recovery service.
And you’d write a fairly large check.
There are many factors involved, and it’s not as easy as you might see on TV, but it can, sometimes, be done.
Prevention is so much easier
My ultimate recommendation? Regular backups.
I have saved hours of valuable time by recovering a deleted file from my backups.
There are so many ways a regular backup protects you. Accidental deletion is one more.