I just opened a SAS dataset stored on my hard drive by double clicking on the file, which opened a temporary dataset in SAS. I then changed my mind and decided I wanted to work directly with the file stored in the folder (i.e: by creating a library for the folder the file lives in). Further, since this is a very large file, I need to be be mindful of duplicate copies (or at least what I thought would be a duplicate copy), so I deleted the temporary file from the "tmp1" folder.
After deleting the file from the tmp1 folder, I went back to the original folder where the files lives on my hard drive and noticed the file was now gone from that location. Does deleting a temporary file in SAS also delete the file from its source location on the hard drive? Why would this happen? Any perspectives on this, or whether the file may still live somewhere on my hard drive, would be appreciated! I did check to see whether it showed up in my recycle bin, and it did not.
When you double-click on a .sas7bdat, no copy is made. SAS instead defines a temporary library for the directory the file resides in, and opens the dataset from there. A delete therefore removes the file from where it was.
Since you couldn't find the file in the Windows trashcan, your only hope is a backup.
There are also recovery tools on the market which are able to recover, e.g., files which have been deleted with SHIFT-DEL (i.e. bypassing the Windows recycle bin). I'm not sure, however, if they can help in your case, in particular if you continued using your computer (or restarted it) after deleting the file.
On my machine I have changed the default file associations, so that a double-click on a .sas7bdat file (or .sas file) in a Windows Explorer window launches SAS Universal Viewer (SAS.UniViewer.exe), not SAS (sas.exe).
Good luck!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: