How to obtain current path without drive letter and colon

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Ovg
Power Member
Power Member
Posts: 755
Joined: 2014-01-06, 16:26 UTC

How to obtain current path without drive letter and colon

Post by *Ovg »

How I can to obtain current path from %T or %P without drive letter and colon for use with other commands?
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can call batch file and do this in it:

Code: Select all

echo "%~p1"
pause
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Only by removing the first two signs via a intermediary (external or in button parameter line) script or tool.
Depends on your need.



Or by hand, by utilizing a leading "?" in parameter line, and modifying the preview by hand before actual executing.


 
 
User avatar
Ovg
Power Member
Power Member
Posts: 755
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

Thanks 2ALL for answers. I want to change dir at target panel
to dir in source, but on target drive. Removing first symbols with vb script - no problem.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

Browsing similar directory structures on different drives?

cm_SyncChangeDir may be an alternative way.

Regards
Holger
User avatar
Ovg
Power Member
Power Member
Posts: 755
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

Stefan2 wrote: Or by hand, by utilizing a leading "?" in parameter line, and modifying the preview by hand before actual executing.
 
Yes, it working, but I want fully automatic ...
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
User avatar
Ovg
Power Member
Power Member
Posts: 755
Joined: 2014-01-06, 16:26 UTC

Post by *Ovg »

2HolgerK

Thanks you for TIP! It is working!
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
Post Reply