So you’re working with a query that you have loaded from a saved file. And now you want to open the folder up that the file is in… or you want to get the full path for that query file. Thankfully, this is easy to do in SSMS.
Just right-click the tab for the query script, and select the appropriate option:
The “Copy Full Path” does just that: It copies the full path of the file to the clipboard. If the path contains a space, then the entire string will be quoted with double-quote characters. The “Open Containing Folder” opens a Windows Explorer window to the folder that the file is in, and it selects the file.
This post is for day five of my month-long blog series “A Month of SSMS Tips”. I have a landing page for the series at bit.ly/MonthOfSSMS. Please visit this page for an easy place to quickly view all of the other tips in this series.