In 2008 I created a small program meant to be run from a terminal window called ccwd which copies the current working directory to the clipboard. While the standard Unix command pwd will print the working directory (that is, the current folder the terminal is in), this will copy it to the clipboard. I found myself using it all the time when I needed to get the directory that I was in.
Example usage in the Windows Command Prompt:
Microsoft Windows [Version 10.0.19043.1165] (c) Microsoft Corporation. All rights reserved. C:\Users\Al>cd Desktop C:\Users\Al\Desktop>ccwd C:\Users\Al\Desktop>
At this point,
C:\Users\Al\Desktop would be copied to the clipboard and could easily be pasted into other apps. I have the C source code and Windows executable here. ccwd.exe does not produce any output, and returns 0 on success and a nonzero value on failure.
I recommend placing the ccwd.exe file in the C:\Windows folder or someplace on the system PATH.