how to make this working command a TC button?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

how to make this working command a TC button?

Post by *comengo »

Code: Select all

robocopy \mydir \mydir_structure /create /e
this command works fine in cmd (win7). It makes copy of a folder, but changes all files sizes to zero.

How do I make it a button in TC? so that I can drag&drop any folder to it and get a copy folder in C:

With the following test, I got: can not find file

Code: Select all

cm_ExecuteSystemCommand|"robocopy ""%P"" ""C:\%N_structure"" /create /e"
Appreciate any response.
Bohny
Junior Member
Junior Member
Posts: 5
Joined: 2023-08-04, 00:24 UTC

Re: how to make this working command a TC button?

Post by *Bohny »

Please try: Operation in the parent directory

Code: Select all

TOTALCMD#BAR#DATA
robocopy
%P%N "D:\%N_structure" /create /e
%commander_exe%,2



-1
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

Re: how to make this working command a TC button?

Post by *comengo »

Bohny wrote: 2024-10-31, 03:11 UTC Please try: Operation in the parent directory

Code: Select all

TOTALCMD#BAR#DATA
robocopy
%P%N "D:\%N_structure" /create /e
%commander_exe%,2



-1
Thanks for your help. I don't know how to put this kind of command format in button panel?
Bohny
Junior Member
Junior Member
Posts: 5
Joined: 2023-08-04, 00:24 UTC

Re: how to make this working command a TC button?

Post by *Bohny »

comengo wrote: 2024-10-31, 05:44 UTC
Bohny wrote: 2024-10-31, 03:11 UTC Please try: Operation in the parent directory

Code: Select all

TOTALCMD#BAR#DATA
robocopy
%P%N "D:\%N_structure" /create /e
%commander_exe%,2



-1
Thanks for your help. I don't know how to put this kind of command format in button panel?
1.Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
2.Right-click on any place in the button bar, then click on "Paste".
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

Re: how to make this working command a TC button?

Post by *comengo »

Bohny wrote: 2024-10-31, 06:13 UTC
1.Click on "SELECT ALL" (to the right of CODE:), then press CTRL+C (copy to clipboard).
2.Right-click on any place in the button bar, then click on "Paste".
Wow, never learned that before. I tried, there's a quick splash of DOS window, but no destination folder created anywhere.
Bohny
Junior Member
Junior Member
Posts: 5
Joined: 2023-08-04, 00:24 UTC

Re: how to make this working command a TC button?

Post by *Bohny »

Selected the source directory, click the button, and go to the root directory of drive D: to view
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

Re: how to make this working command a TC button?

Post by *comengo »

Bohny wrote: 2024-10-31, 09:09 UTC Selected the source directory, click the button, and go to the root directory of drive D: to view
Awesome! Works great.
One last thing please: if folder name includes space, it won't work, while in cmd this is not a problem. Possible to improve?
sa16
Senior Member
Senior Member
Posts: 253
Joined: 2021-09-10, 07:15 UTC

Re: how to make this working command a TC button?

Post by *sa16 »

2comengo
Try with the following parameters in the button (TC 10.51 and fresh):

Code: Select all

"%Q%P%N" "D:\%N_structure" /create /e
Last edited by sa16 on 2024-10-31, 13:50 UTC, edited 1 time in total.
User avatar
nsp
Power Member
Power Member
Posts: 1858
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: how to make this working command a TC button?

Post by *nsp »

If you want to chose destination drive you can add "?" to be able to edit manually or use askparam.

Code: Select all

TOTALCMD#BAR#DATA
robocopy
?%Q%P%N "D:\%N_structure" /create /e
%commander_exe%,2



-1
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

Re: how to make this working command a TC button?

Post by *comengo »

sa16 wrote: 2024-10-31, 12:36 UTC 2comengo
Try with the following parameters in the button (TC 10.51 and fresh):

Code: Select all

"%Q%P%N" "D:\%N_structure" /create /e
Thank you. Appreciate it!
comengo
Junior Member
Junior Member
Posts: 8
Joined: 2021-03-15, 23:53 UTC

Re: how to make this working command a TC button?

Post by *comengo »

nsp wrote: 2024-10-31, 13:45 UTC If you want to chose destination drive you can add "?" to be able to edit manually or use askparam.

Code: Select all

TOTALCMD#BAR#DATA
robocopy
?%Q%P%N "D:\%N_structure" /create /e
%commander_exe%,2



-1
Thanks a lot.
Post Reply