Copy & Paste Specific File to Current TC Window

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
BeRoM
Posts: 16
Joined: 17 Aug 2022, 12:51

Re: Copy & Paste Specific File to Current TC Window

Post by BeRoM » 18 Aug 2022, 12:16

ahk7 wrote:
18 Aug 2022, 11:04
3. Create a TC button

Right click on the TC button bar, change+add, and add

Command: %comspec% /c Copy \\homeserver\users\ID001\template.dbf
Parameter: %P
Don't forget to select an icon

Now when you press the button it should copy that file to the current panel

4. Create a User Command

If you don't have one already, create a file in your TC INI folder (check Help, About for the path to your totalcmd.ini file)

You can use notepad.exe - The filename must be "usercmd.ini" Add:

Code: Select all

[em_CopyTemplateFile]
cmd=%comspec% /c Copy \\homeserver\users\ID001\template.dbf
param=%P
Restart TC just to be sure. Go to Misc. section in the configuration menu, select a shortcut you'd like to use and search for em_CopyTemplateFile in the list
Although it's not what I was expecting, Steps 3 and 4 worked for me, with Step 4 being the best alternative to an AHK script. I think I can make due with this alternative. Thanks for the new knowledge!

ahk7
Posts: 575
Joined: 06 Nov 2013, 16:35

Re: Copy & Paste Specific File to Current TC Window

Post by ahk7 » 18 Aug 2022, 13:33

@BeRoM Glad it helped

@wetware05 TCUP doesn't ring a bell, but the vertical bar does indeed influence the class name it seems (as I never use(d) the vertical bar myself it never caused any issues. It is easy to accommodate for it, try Window5 and if it is not a valid path try the other class.

Post Reply

Return to “Ask for Help (v1)”