This patch adds a command line flag, -df, which starts Console with the working directory set to the last directory in the path of the next argument. For example, starting Console with -df "C:\Windows\sample.txt" will start Console in the C:\Windows directory.
The main use case of this patch is when integrating with the Windows UI (such as opening a document with Console, having a shortcut to Console in the SendTo folder, or adding a Console context menu item to files or folders).
I personally use it for my SendTo folder. I have a 'Consoles' folder under my SendTo folder, and inside, I have shortcuts to Console, for each of my different types of tabs, and with the final argument in the shortcut being '-df'. This allows me to, for example, right click on a source file and send it to my Visual Studio command prompt. Console opens the appropriate shell and changes to the file's containing directory.
Log in to post a comment.