Dec 092014

Earlier this year I did a post on a new method I stumbled up on for copying and pasting file paths. I thought it was a huge timesaver, and I use it multiple times daily. Judging from the reactions I got, I’d say plenty of others have found it useful as well.

A few weeks ago, the folks at Webucator reached out to me, asking if they could make a quick video demonstrating what I show in that post as part of their free series called SQL Server Solutions from the Web. I was very happy to let them do so; here’s their finished product:

Thanks, Webucator! If you like what you see here, be sure to check out the other videos on their YouTube channel. Webucator also offers a wide variety of SQL Server training courses if you’re looking to go even more in-depth.

Feb 212014

I know most of my important file locations by heart. Whenever I need to do things that require typing out a file’s full path, such as copying a backup or taking a peek at logs, I can type those paths from memory without issue.

On the other hand, when I’m working with systems I’m less familiar with or have never seen before, my memory can’t help me. At this point I’ve always opted for copying and pasting the paths of the file into SSMS or wherever else I might need it. This works just fine, but I’ve always been annoyed that the path and file name need to be selected and copied into the editor separately.

Two rounds of copy and paste seemed a little much. There has to be a better way, and in fact there is. This has probably been present in Windows for quite a while, but I found out about it just this week. I’ve long known that holding down the shift key while right-clicking on a file brings up extra options in the context menu, but what I didn’t realize is that one of those options is “copy as path”.

This will copy the full path of the file, including the name, to the clipboard, and you can now paste it wherever you like.

The Catch

The only downside to this is that, as you can see in the image above, the file path is surrounded in double quotes. This is great for pasting into a command prompt, but you’ll need to replace them with single quotes when working in SSMS.

UPDATE: Webucator has done a video demonstrating what I show in this post. You can see all the details here.