How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

English support forum

Moderators: white, Hacker, petermad, Stefan2

sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *sa16 »

2oko
No, another panel is not focused. Files are copied all.
Thank you! That is, the cursor remains in the original panel...
And I have in another panel. Until I was able to achieve your result, I tried on several computers.

Found! I did in the TCx32, but the problem arises in the TCx64.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *Fla$her »

Why not report it here?
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *sa16 »

I fear that the behavior in x32 will be recognized as a bug. :)
Of course, it is curious, using the example of a simple chain of cm_Copy,cm_FocusTrg to find out whether it is possible to achieve the same result in the TCx64 (using its settings) as in the TCx32?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *ghisler(Author) »

Total Commander only waits for the completion of commands which are executed in the foreground. cm_copy creates a background thread even when copying in the foreground, so you can use the "Background" button. For short commands, consider using a command like:
cm_Wait 100
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *Fla$her »

2ghisler(Author)
We are talking about the difference in the behavior of x32 and x64. cm_ is not executed until em_ (cm_ + params) is executed on x32, which cannot be said about x64.

There is still a difference between this suggestion with the expectation of process completion and this situation, where an internal command is expected to be executed.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *ghisler(Author) »

Are you talking about the em_command defined above with cmd=cm_Copy ?
cm_Copy is always performed in a background thread, so neither TC 32-bit nur TC 64-bit wait for the completion. I can only guess that there is a slight speed difference, so cm_Copy finishes first in 32-bit. That's why I suggested adding a cm_Wait 100 after the em_ command.
Author of Total Commander
https://www.ghisler.com
User avatar
AntonyD
Power Member
Power Member
Posts: 1249
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *AntonyD »

But why there is only NUMERIC waiting command?
WHY we should guess - how much we must enter as a number for cm_Wait *** command?
Why not to implement cm_WaitSync? So TC will wait when the prev. operation will complete.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *ghisler(Author) »

Because there is currently no simple way to determine for which threads it should wait. For example, the user may have started multiple background copy operations before the wait command.
Author of Total Commander
https://www.ghisler.com
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *sa16 »

2ghisler(Author)
In the cm_Copy,cm_FocusTrg chain, I cannot understand the difference in behavior when I click OK in the copy dialog: in TCx32 the command to go to another panel works, in TCx64 it does not.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *ghisler(Author) »

When you press OK, the cm_Copy function starts a background thread to perform the operation. Then the function returns and Total Commander starts the next command in the chain. It's now a question of timing whether cm_FocusTrg comes first, or the background copy thread finishes first. It's unpredictable. I don't understand why you get consistent differences between 32-bit and 64-bit, maybe the copy commands in 64-bit take a few more processing cycles than in 32-bit...
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: How to easy copy selected files to oposite side into subfolder with the same name as source parent folder?

Post by *Fla$her »

ghisler(Author) wrote: 2024-02-15, 08:16 UTC It's now a question of timing whether cm_FocusTrg comes first, or the background copy thread finishes first. It's unpredictable.
Are you talking about /B0 or /B1? In the case of /B0 on TC x32, we always get the same result, waiting for the progress window to close if [Background] hasn't been pressed. The next command in the chain always works out. Neither the total size of the files nor their number affects this in any way.
Overquoting is evil! 👎
Post Reply