About external drives / pen usb

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
franziscko
Junior Member
Junior Member
Posts: 25
Joined: 2006-10-11, 20:09 UTC
Location: Ragusa - Sicily - Italy !!!

About external drives / pen usb

Post by *franziscko »

Hi.
Is there any way, when i insert a pen drive usb or a external hd, to open it in one of 2 windows of tc automatically?
sorry for my bad english...

Regards,

Francesco
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Post by *HerbieH »

Hello Francesco.

I have used 'USBDLM' (freeware) for many years to administer Windows behaviour, when I plug in all sorts of USB-drives.

USBDLM can be used to assign specific drive letters, AND to start e.g. 'Total Commander' and show the drive in one of the two windows, as you plug in your USB drive. :)

Homepage:
http://www.uwe-sieber.de/usbdlm_e.html

If you wish, I can post my 'usbdlm.ini' file here.
HerbieH*
-Keep on makin' music!
franziscko
Junior Member
Junior Member
Posts: 25
Joined: 2006-10-11, 20:09 UTC
Location: Ragusa - Sicily - Italy !!!

Post by *franziscko »

HerbieH wrote:Hello Francesco.

I have used 'USBDLM' (freeware) for many years to administer Windows behaviour, when I plug in all sorts of USB-drives.

USBDLM can be used to assign specific drive letters, AND to start e.g. 'Total Commander' and show the drive in one of the two windows, as you plug in your USB drive. :)

Homepage:
http://www.uwe-sieber.de/usbdlm_e.html

If you wish, I can post my 'usbdlm.ini' file here.
Thank you, but i have always TC open, i want only to make one of the two windows active when i plug a pendrive or external hd.
So i don't think i need a specific program.

I don't know why Mr. Ghisler not reply this question... :cry:
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7016
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

franziscko wrote:
HerbieH wrote:Hello Francesco.

I have used 'USBDLM' (freeware) for many years to administer Windows behaviour, when I plug in all sorts of USB-drives.

USBDLM can be used to assign specific drive letters, AND to start e.g. 'Total Commander' and show the drive in one of the two windows, as you plug in your USB drive. :)

Homepage:
http://www.uwe-sieber.de/usbdlm_e.html

If you wish, I can post my 'usbdlm.ini' file here.
Thank you, but i have always TC open, i want only to make one of the two windows active when i plug a pendrive or external hd.
So i don't think i need a specific program.

I don't know why Mr. Ghisler not reply this question... :cry:
USBDLM can make what you requested !
Using the TC parameters /o and the target dir it can open what you want on the newly inserted stick or drive.
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Post by *HerbieH »

Hello again Francesco.

I'm sure, Mr. Ghisler is reading this, but maybe he chooses not to reply, if he finds the aswers already given satisfactory.

Both Horst.Epp and myself have given a qualified answer, which is typical for most answers on this forum, so instead of complaning about, that 'the big man himself' doesn't answer, you could choose to test the solution given by two devoted TC users. I even offered you further assistance, if you should require it.

PS: You may even consider thanking Horst and I at some point. :-)

Greetings from..
HerbieH*
-Keep on makin' music!
franziscko
Junior Member
Junior Member
Posts: 25
Joined: 2006-10-11, 20:09 UTC
Location: Ragusa - Sicily - Italy !!!

Post by *franziscko »

Thanks to everybody!

I'm trying USBDLM and i've found 2 problems...

1) i plug pendrive and starts TC and a windows show root... :D is ok...
but if i have already launched TC, it opens another session of TC, and i don't want this. What can i do?

2) in USBDLM.ini i must write absolute path of TC.
Now, i'm using TC as a portable app, i can launch it from everywere, like a external drive or another pendrive, or simply another temporarly path.
How to tell this to USBDLM?

May many thanks... :)
User avatar
HerbieH
Member
Member
Posts: 154
Joined: 2003-02-11, 10:04 UTC

Post by *HerbieH »

Hello Francesco. Thank you for the many thanks. :-)

Answers:
1). The /O option, suggested by Horst, works for me. Try using the capital letter O. Btw. additional /T opens the folder in a new tab.

2). I have problems there too. USBDLM seems only to understand user- and system-variables. So %COMMANDER_PATH% doesn't work in the .ini-file, even though I start the service from TC. Maybe someone else knows the answer to this.

A batch file, that sets a custom variable pointing to the TC-path, before running TC (and USBDLM), might be the answer, but I don't have time to test it right now, as I am going on vacation. I will get back to the subject when I get home.


This is my USBDLM.INI. I click on a small 'balloon' using left/right mouse button to put the USB drive in left or right TC window. OBS: The obervant reader will find some redundant settings, which should be removed...

---------------------------------------------
[Settings]
NoMediaNoLetter=1
OptimizeUsbDrivesForSpeed=1
ExternalMountEvents=1
DeleteMountPointsOnRemoval=1
UsbWriteCacheEnable=1
VirtualVolumes=1

[BalloonTips]
SuppressWindowsBalloons=1
WaitForLastVolume=1
Enabled=1
Timeout=20000
ShowSize=1
MaxMountPointsToShow=2

[OnBalloonClick1]
open=c:\t\TOTALCMD64.EXE /O /T /L=%drive%

[OnBalloonRClick1]
open=c:\t\TOTALCMD64.EXE /O /T /R=%drive%

[DriveLetters2]
Letter1=k
Letter2=n
Letter3=q
Letter4=v

[NetworkLetters]
Letter1=o
Letter2=m

[DeleteUnusedNtfsMountpoints]
Folder1=C:\USB
---------------------------------------------


Greetings..
HerbieH*
-Keep on makin' music!
franziscko
Junior Member
Junior Member
Posts: 25
Joined: 2006-10-11, 20:09 UTC
Location: Ragusa - Sicily - Italy !!!

Post by *franziscko »

Herbieh, many thanks for helping me.

1) i've tried the /O option and it works great 8)
an i' found a new one mode. Simply setting Configuration/options/operations/ run only 1 copy of TC.
But i think i will use /O.

2)..... :cry:


Thanks (again :D ) for your .ini, i will try it immediately.
:wink:
Uwe Sieber
Junior Member
Junior Member
Posts: 5
Joined: 2010-10-12, 18:27 UTC

Post by *Uwe Sieber »

franziscko wrote: I'm trying USBDLM and i've found 2 problems...

2) in USBDLM.ini i must write absolute path of TC.
Now, i'm using TC as a portable app, i can launch it from everywere, like a external drive or another pendrive, or simply another temporarly path.
How to tell this to USBDLM?
You are using different portable TCs on the same computer? What is this good for? How do you know where they are? Is the information about where the TOTALCMD.EXE is found available anywhere?
USBDLM can use environment vars in open= lines but they must be system wide, not user specific.

Uwe Sieber
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Uwe.
You are using different portable TCs on the same computer? What is this good for?
If I understand franziscko right, he uses one portable Total Commander installation - on a pen drive or on a USB HDD - on different computers.
The USB device will be assigned different drive letters on different computers. Therefore being able to use the Total Commander internal variable like %COMMANDER_PATH% which holds the current fully qualified programme folder name would be helpful.
%COMMANDER_PATH% and %COMMANDER_DRIVE% are available inside the running Total Commander process and its children inherit these variables.
Starting with Total Commander 8.0 beta there is a further internal variable named %COMMANDER_EXE%, again available inside the running Total Commander process and its children.
  • %COMMANDER_DRIVE%: drive letter plus colon where Total Commander lives.
  • %COMMANDER_PATH%: fully qualified pathname of the Total Commander programme.
  • %COMMANDER_EXE%: fully qualified filename of the Total Commander executable, i.e. of totalcmd.exe (32-bit) or totalcmd64.exe (64-bit).
You are using different portable TCs on the same computer? What is this good for?
Personally, I do. Why? Total Commander cannot handle more than one installed version, installed by the installer.
But during lengthy beta test periods :wink: it is very convenient to have a minimum of two portable installations on the disk: the current beta and the previous beta: reproduce reported bugs in the previous beta, test bugfixes in the current beta.
(But this is only me, not franziscko.)

Cheers,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 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
Uwe Sieber
Junior Member
Junior Member
Posts: 5
Joined: 2010-10-12, 18:27 UTC

Post by *Uwe Sieber »

Ok, I could let USBDLM look for a running TC, determine its EXE and call this in case none is found the usual way.
But is there more than one user in the world who needs this?

Cheers,

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

Post by *karlchen »

Hello, Uwe.

This decision will be up to you. :)

As far as I understood after having read the whole thread once again carefully the challenge is this:
  • Francesco runs a portable Total Commander installation from a USB device which he connects to different computers as need be.
  • Whenever he attaches another USB device, he would like Total Commander to open the newly attached drive in one of the 2 file panels automatically. Yet, Total Commander cannot do so. Such an auto-open-and-display feature does not exist.
  • This is where your little helper enters the scene. Among a lot of other actions, it can spawn a programme when a USB device has been attached.
  • Now the idea is to make your USBDLM (re-)launch Total Commander in such a way that it reuses the running instance, but displays the inserted USB drive in either of the two file panels. - Using the right Total Commander commandline options, this can be achieved easily.
  • If Francesco's Total Commander installation were a normal T.C. installation, hardcoding the path to totalcmd.exe in the file USBDLM.ini would not be a problem. - In this case using USBDLM would mean the happy end of the story.
  • Yet, as in the middle of this thread Francesco states he uses a portable installation, the path to totalcmd.exe may vary. So hardcoding it in USBDLM.ini is not an option.
  • Now we are in a plight:
    Total Commander does not auto-open newly attached devices.
    Using your USBDLM would be a potential workaround.
    Yet, your nifty little programme will not be able to launch T.C., because Francesco's T.C. is portable and therefore the path to totalcmd.exe will vary.
I wonder whether it can be such a hassle to press <alt><f1> plus drive letter or <alt><f2> plus drive letter in order to make T.C. display a newly attached drive?

Cheers,
Karl
MX Linux 21.3 64-bit xfce, Total Commander 11.50 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
franziscko
Junior Member
Junior Member
Posts: 25
Joined: 2006-10-11, 20:09 UTC
Location: Ragusa - Sicily - Italy !!!

Post by *franziscko »

Karlchen....PERFECT!!! i have no other words....
Uwe Sieber
Junior Member
Junior Member
Posts: 5
Joined: 2010-10-12, 18:27 UTC

Post by *Uwe Sieber »

If the portable TCs are installed in the same path on each drive then a batch of OnArrival section would work which look on each possible drive for the TOTALCMD.EXE and use the first one found:

[OnArrival20]
FileExists=E:\Tools\TC\TOTALCMD.EXE
open=E:\Tools\TC\TOTALCMD.EXE /O /T /L=%drive%

[OnArrival21]
FileExists=F:\Tools\TC\TOTALCMD.EXE
open=F:\Tools\TC\TOTALCMD.EXE /O /T /L=%drive%

[OnArrival22]
FileExists=G:\Tools\TC\TOTALCMD.EXE
open=G:\Tools\TC\TOTALCMD.EXE /O /T /L=%drive%

Not very nice but would work.

Uwe
Post Reply