Button to create folder from filename, but in other panel

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
TotalRobbie
Junior Member
Junior Member
Posts: 20
Joined: 2020-02-08, 09:04 UTC

Button to create folder from filename, but in other panel

Post by *TotalRobbie »

I want to make a button

with the action

making a map in the one panel with the name from the selected file (without extension) on the other panel
then
move the file into the map
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to create a button

Post by *Horst.Epp »

Look into the Help and do it. :)
If you then have open questions come back and ask.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TotalRobbie
Junior Member
Junior Member
Posts: 20
Joined: 2020-02-08, 09:04 UTC

Re: How to create a button

Post by *TotalRobbie »

a try more then 3 day

I don't get any further than that

Code: Select all

cm_MkDirOther %O ,
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: How to create a button

Post by *Stefan2 »

Hi TotalRobbie

TotalRobbie wrote: 2020-02-10, 13:37 UTC I want to make a button
with the action
making a map in the one panel with the name from the selected file (without extension) on the other panel


- Menu Configuration > Button Bar...

In the Change Single Button -dialog
- Press [Add]

- Press F1 key and read:

> "the name from the selected file (without extension)" >>> %O the current filename without extension
> "on the other panel " >>> %T the current target path.


>Together: "%T\%O" ----- in "Quotes"!

>DOS command "MkDir" >>> MD "%T\%O"



Button:
Command: cmd /c ---or--- cmd /K
Parameters: MD "%T\%O"
Start path:
Icon: cmd.exe --or-- wcmicons.dll
Tooltip: MD "%T\%O"



- - -
TotalRobbie wrote: 2020-02-10, 13:37 UTC then
move the file into the map
That will need to utilize a script: MS-DOS batch / VBScript /JS / AutoHotkey...


we can do that in a next step...



HTH?
TotalRobbie
Junior Member
Junior Member
Posts: 20
Joined: 2020-02-08, 09:04 UTC

Re: How to create a button

Post by *TotalRobbie »

Yes
he made the map.
Last edited by TotalRobbie on 2020-02-10, 14:54 UTC, edited 1 time in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6480
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: How to create a button

Post by *Horst.Epp »

One way is to define an em_ command in your Usercmd.ini like

Code: Select all

[em_ext_copyallnewdir]
cmd=%COMSPEC% /c
param=(if not exist "%T%O" md "%T%O") && (if not exist %P%N\* for %%i in (%P%S) do if not exist %%i\* copy %%i "%T%O\")
menu=Copy marked files to directory with name under cursor to opposite panel
button=%COMMANDER_PATH%\wcmicons.dll,29
Then your button is just this new command

Code: Select all

em_ext_copyallnewdir
This idea and the em_command are from petermads Extended Menus for TC
https://www.ghisler.ch/board/viewtopic.php?t=33740
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TotalRobbie
Junior Member
Junior Member
Posts: 20
Joined: 2020-02-08, 09:04 UTC

Re: How to create a button

Post by *TotalRobbie »

i am so happy

a change only copy in move


Perfect
Thanks
Post Reply