Skip to content

Instantly share code, notes, and snippets.

@iamkarlson
Created December 24, 2020 14:44
Show Gist options
  • Select an option

  • Save iamkarlson/4d9ba05a0701d4e14d13c113961190a7 to your computer and use it in GitHub Desktop.

Select an option

Save iamkarlson/4d9ba05a0701d4e14d13c113961190a7 to your computer and use it in GitHub Desktop.
AutoHotkey script for "Send To" Windows menu
SetTitleMatchMode 2
global Destination := "D:\OneDrive\3dprinter\things"
;global Destination := "D:\trash\testing"
Loop %0%
{
Item := %A_Index%
Extract(Item)
FileDelete, %Item%
}
Extract(FilePath){
FileCopy, %FilePath%, %Destination%
SplitPath, FilePath, FileName,,,TargetDir
SetWorkingDir, %Destination%
Run, C:\ProgramData\chocolatey\bin\7z.exe x -y %FileName% -o%TargetDir%
}
if WinExist(Destination)
WinActivate ; use the window found above
else
Run, explore %Destination%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment