Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
Last active July 28, 2022 15:38
Show Gist options
  • Save JoeGlines/03e287a2f91624becd30b80e7ca3f975 to your computer and use it in GitHub Desktop.
Save JoeGlines/03e287a2f91624becd30b80e7ca3f975 to your computer and use it in GitHub Desktop.
;****************copy path of file selected to clipboard***************************************
#IfWinActive ahk_class CabinetWClass ;Explorer window
^+c:: ;Copy explorer path to clipboard
clipboard = ; Empty the clipboard
SendInput, ^c ;changd from Send 11/23
ClipWait, 1
If ErrorLevel ;Added errorLevel checking
{
MsgBox, No text was sent to clipboard
Return
}
clipboard="%clipboard%" ;Path from explorer
;~ MsgBox % A_Username a_tab a_computerName
;*********replace drive letter for full network path* Use UNC path to Network Drive to determine replacement*******
IfEqual, A_UserName,Joe,StringReplace,Clipboard,Clipboard,B:\,C:\DropBox\ ;Joe
;~ IfEqual, A_UserName,a0225522,StringReplace,Clipboard,Clipboard,E:,\\DFLFS04\email ;Joe
;~ IfEqual, A_UserName,a0601223,StringReplace,Clipboard,Clipboard,E:,\\DFLFS04\email ;Suzy
;~ IfEqual, A_UserName,x0168757,StringReplace,Clipboard,Clipboard,Z:,\\DTHS21\group ;Jenny
Sort, clipboard ; This also converts to text (full path and name of each file).
Return
#IfWinActive
C:\Users\Joe\Dropbox\Guests\the-Automator\Scripts to Work on\Newsletter\Newsletter Manager\src\Subscribers\2022-07-28-subscribers.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment