Does anyone know how to copy paths using AutoHotkey 2?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ootoo
Junior Member
Junior Member
Posts: 17
Joined: 2022-02-28, 05:29 UTC

Does anyone know how to copy paths using AutoHotkey 2?

Post by *ootoo »

I want to implement the following three functions using three AutoHotkey 2 scripts, but I'm not very familiar with it and can't do it:

1. Copy the current folder path to the clipboard.
2. Copy the path of the selected file to the clipboard.
3. Copy the name of the selected file to the clipboard.

I know TC (Total Commander) has its own commands, but I don't want to use keystrokes. I just want to click on the script shortcut to copy the information because I prefer using the mouse, and the scripts can be placed as shortcuts in a quick launch program.

AutoHotkey 2 scripts
Fla$her
Power Member
Power Member
Posts: 2982
Joined: 2020-01-18, 04:03 UTC

Re: Does anyone know how to copy paths using AutoHotkey 2?

Post by *Fla$her »

ootoo wrote: 2024-08-27, 02:49 UTC I know TC (Total Commander) has its own commands, but I don't want to use keystrokes.
Horkeys are only the part that interacts with TC commands. Nothing prevents you from adding such commands to the buttons (and not only):
1. cm_CopySrcPathToClip
2. cm_CopyFullNamesToClip
3. cm_CopyNamesToClip

You don't need AHK for this.
Overquoting is evil! 👎
Post Reply