Synchronizing totalcmd between Desktop, Laptop and USB stick

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
dekiblue
Junior Member
Junior Member
Posts: 30
Joined: 2010-09-30, 14:39 UTC

Synchronizing totalcmd between Desktop, Laptop and USB stick

Post by *dekiblue »

My primary installation in on my desktop PC. When I wanted to port it to Laptop it turns out that if I just copy c:\totalcmd folder I don't get the expected results. So I did a fresh install on laptop and copied the desktop files over it. Then I used tc2USB for a portable install, but this tool skipped ALL the plugins.

So, what is the correct procedure to keep desktop and laptop install in sync and how to have portable USB version that includes the plugins?

Thanks,

Deki
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Deki.

A complete Total Commander installation consists of more than just the Total Commander programme folder:
  • Total Commander programme folder (%COMMANDER_PATH%, seen from inside the running T.C. instance)
  • The foldertree which holds the installed T.C. plugins, if any. The wincmd.ini parameter pluginbasedir, default value pluginbasedir=%COMMANDER_PATH%\Plugins\, will tell you where the foldertree lives, provided you have installed in the normal way that T.C. offers.
  • The files which constitute your T.C. profile, wincmd.ini, wcx_ftp.ini, the .bar-files.
    Where these files are located depends on what you told the setup.
    You can get the location of the INI files by going to Help => About.
    You can get the location of the .bar files by pretending to change the .bar-file (Configure = Change buttonbar)
In order to transfer an existing T.C. installation from the desktop machine to the notebook, you will have to backup all the listed elements and transfer them to the same locations on the notebook.

In order to create a portable installation, you may resort to tc2usb. You put the executable file in %COMMANDER_PATH% and launch it from inside the running T.C. instance.
Beware:
I am not quite sure whether tc2usb will correctly create portable installations of T.C. 8.0 x64 and combined T.C. 8.0 x32/x64 installations.

HTH,
Karl
--
Ref:
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
dekiblue
Junior Member
Junior Member
Posts: 30
Joined: 2010-09-30, 14:39 UTC

Post by *dekiblue »

karlchen wrote: [*]The files which constitute your T.C. profile, wincmd.ini, wcx_ftp.ini, the .bar-files.
Where these files are located depends on what you told the setup.

In order to create a portable installation, you may resort to tc2usb. You put the executable file in %COMMANDER_PATH% and launch it from inside the running T.C. instance.
Than you for you reply Karl.

When I was installing TC I already had in mind a plan to port it to laptop. That's why I put the .ini files to totalcmd folder.

As I said before, tc2USB does not bring the plugins.

Regards,

Deki
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Deki.

After you have launched tc2usb.exe from inside the running T.C. instance,
you will be prompted to specify the target location of your portable installation.

Once you have done so you should see the second dialogue box
[x] Copy settings from desktop version
... General: <path to wincmd.ini>
... FTP: <path to wcx_ftp.in>
[x] Copy plugins from desktop version

Provided tc2usb.exe has succeeded in analyzing your T.C. desktop intallation both option should be ticked (activated).
Is this the case?
If not try to tick the options, in particular the coption to copy plugins from desktop version.
Click next.

The third dialogue box should list all the plugins which tc2usb.exe has detected, none of them selected, however.
So click on the button [x] Check all.
Alternatively tick every plugin which you want in the portable installation individually.
Click next.

In the fourth dialogue box, tick all the additinal INI files which should be copied to the portable installation.

Click next twice.

tc2usb.exe will start copying files to the selected USB device.

Once it has done so, click finish. - Check whether the plugins have been transferred to the portable installation. They shoud be located in the folders below \totalcmd\plugins.

Note:
tc2usb.exe will only transfer the 32-bit executables and DLLs, it will ignore the corresponding 64-bit files. Therefore if you have got a combined 32-bit/64-bit desktop installation like me, you will have to transfer the missing files from %COMMANDER_PATH% to \totalcmd manually (or by using "Synchronize dirs").

Kind regards.
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
dekiblue
Junior Member
Junior Member
Posts: 30
Joined: 2010-09-30, 14:39 UTC

Post by *dekiblue »

Thank you Karl for your detailed explanation.

I have tried that just now. I didn't yet check if the plugins are properly transferred but I when I started the TC from USB it shows only 3 icons in a bar out of more than 80 I have. All the icons with a path like this:

%COMMANDER_PATH%\Icons\X-Qute.dll

or like this:

%COMMANDER_PATH%\Icons\icon4.ico

Of course, I manually added the Icons folder to TC folder.

Is there a way to fix that?

Also does it matter that the USB drive letter is not the same on Desktop where I made the portable TC and laptop where I open TC?

Best regards
Deki
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Deki.

I am not quite sure whether I understand your problem related to the .bar files correctly. Are only those icons displayed correctly for which the pathnames to the icon files use the variable %COMMANDER_PATH%? - I would expect so, because %COMMANDER_PATH% is always valid inside the running T.C. instance, no matter where T.C. is located.

Another very useful variable is %COMMANDER_DRIVE%. It always holds the drive name of the drive where running T.C. instance lives.

In particular for portable T.C. installations the variables %COMMANDER_DRIVE% and %COMMANDER_PATH% are perfect ways of referencing the T.C. drive, no matter what it is, and the T.C. programme folder, no matter where it is.

Therefore, in order to fix any icon which is not displayed, because the specified path is not found, try to rewrite the path specification in such a way that it references %COMMANDER_DRIVE% or %COMMANDER_PATH%.

Doing so for about 80 icons may be quite a lot of work. Yet, chances are not bad that you will be able to "revive" most icons this way.

Kind regards,
Karl
--
Variables that are valid inside the running T.C. instance only:
+ %COMMANDER_DRIVE%
+ %COMMANDER_PATH%
+ %COMMANDER_INI%
+ %COMMANDER_EXE%
--
Additionally you can use any valid Windows environment variables like e.g.
+ %APPDATA%
+ %ProgramFiles%
+ %ProgramFiles(x86)%
+ %Userprofile%
+ etc pp
--
Helpful T.C. WIKI article on this topic: Navigation
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
dekiblue
Junior Member
Junior Member
Posts: 30
Joined: 2010-09-30, 14:39 UTC

Post by *dekiblue »

Hi Karl,

This was weird. I checked all the icons ( +80) and ALL of them had %COMMANDER_PATH% variable in their path. If I right click on an icon and chose Change.., I could see the %COMMANDER_PATH% used for the path of the icon file, so I just had to click OK and the icon would reappear.

Not wanting to do that another 80 or so times I tried going to Preferences / Change button bar. And just clicking on OK ALL the icons magically showed up!

Thanks for your help!

Deki
User avatar
karlchen
Power Member
Power Member
Posts: 4601
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Deki.

I see.
The phenomenon which you faced is not totally weird:
T.C. stores the definitions of buttonbar icons and the associated actions in a .bar-file. The bar-file is a pure text file.
When used for the first time T.C. has to read all the referenced .ICO-files in order to display the icons.
In order to speed up this process in future T.C. caches these icons in .BR2 files.
TC2USB only transfers the .BAR files to the USB pendrive, because T.C. can rebuild the corresponding .BR2-file.
This is what you have seen: T.C. had not yet read all the referenced 80 icons and not rebuilt the cache file, yet. Doing so can be slow on a USB pendrive.
When you pretended to reconfigure some of your icon selections, T.C. read the affected icons immediately and displayed them.
When you confirmed the whole buttonbar T.C. rebuilt the missing or incomplete cache file.

Kind regards,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 10.52 64-bit
The people of Alderaan keep on bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine.
The Prophet's Song
Post Reply