Copy Filenames from selected files

Post your working scripts, libraries and tools
User avatar
elModo7
Posts: 36
Joined: 01 Sep 2017, 02:38

Copy Filenames from selected files

Post by elModo7 » 12 Jan 2018, 07:53

Clone of CopyFilenames: Copy filenames to the Windows clipboard

Usage
Copy files/folders from the Windows Explorer, open notepad an press Ctrl+Alt+v. Filenames of selected files without path are copied.

Code: Select all

#SingleInstance, Force
; Copy files/folders from the Windows Explorer, open notepad an press Ctrl+Alt+v. Filenames of selected files without path are copied.
^!v::
ClipboardAntigua := Clipboard
loop Parse, Clipboard, `n, `r
	Enviar(A_LoopField)
Clipboard := ClipboardAntigua
return

Enviar(linea){
	Haystack := linea
	Needle := "[^\\]+$"
	RegExMatch(Haystack, Needle, Match)
	Clipboard  := Match
	Send, ^v	
	Send, {Enter}
}
:beer:

Return to “Scripts and Functions”