Advertisement
Guest User

AHK script for prompt in explorer window path

a guest
Apr 16th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ; Run CMD.EXE in path shown in Explorer caption, otherwise in c:\windows
  2. #c::
  3. IfWinActive ahk_class CabinetWClass
  4. {
  5. WinGetActiveTitle, pathInCaption
  6. If RegExMatch(pathInCaption, "i)^[a-z]:\\")
  7. Run cmd.exe /K "cd /d %pathInCaption%"
  8. Else
  9. MsgBox % "Full path must be shown in Explorer caption for this hotkey to work. UNC paths not allowed."
  10. } Else
  11. Run cmd.exe /K "cd /d c:\windows\"
  12. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement