Hi,
i whant work with subst, and there need i a Path without last backslash for it's works,
as example,
%P = full Path with backslash
there could stay
%p = path without backslash
Big P with backslash, small p without backslash at end of the full path,
then should also works
subst v: %P (C:\bearbeit\)
subst v: %p (C:\bearbeit)
or exist some variable.. i think, i have found nothing..
also in the Wiki under usercmd.ini stand nothing ..
best
usercmd.ini Path without backslash as Variable in usercmd.ini
Moderators: Hacker, petermad, Stefan2, white
usercmd.ini Path without backslash as Variable in usercmd.ini
Meine Blackysgate.de/net
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos
Re: usercmd.ini Path without backslash as Variable in usercmd.ini
You could use a batch file for this:
Put it on a button with parameter %P
Remove the echos and pause after testing and set "Run minimized"
Code: Select all
Echo %1%
Set folderpath=%1%
If %folderpath:~-1%==\ Set folderpath=%folderpath:~0,-1%
Echo %folderpath%
Subst v: %folderpath%
Pause
Remove the echos and pause after testing and set "Run minimized"
Re: usercmd.ini Path without backslash as Variable in usercmd.ini
2blacky
%p is alreday used for short path name:
%p is alreday used for short path name:
You can use: %P:~0,-1 to cut off the backslash:Help wrote:%N and %M insert the long name, while %n and %m insert the DOS alias name (8.3). %P and %T insert the long path name, and %p and %t the short path name (Same for %o, %e, %b and %s). %p/%t inserts the ftp URL of the directory for ftp connections.
Help wrote:All parameters now support substring fields in the form :~start,length, e.g. %N:~2,5 or %N:~-8,5 . To append a number directly after the length value, use another ~ character, e.g. %N:~2,5~2. Negative vaules are measured from the end of the string. Example: %P:~0,-1 cuts off the backslash from the path.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: usercmd.ini Path without backslash as Variable in usercmd.ini
suupy, thank you very mutch 
added the the wiki :
https://www.ghisler.ch/wikide/index.php?title=Usercmd.ini_Einstellungen
and added at example

added the the wiki :
https://www.ghisler.ch/wikide/index.php?title=Usercmd.ini_Einstellungen
and added at example
by the way, you are able to copy the german Wiki entry to wikien so also in different languages..[em_subst+]
cmd=cmd
param=? /C subst <drive> "%P:~0,-1"
#path= "Startpfad": Arbeitsordner, bleibt meistens leer, da das gerade aktive Panel (Fenster) als Arbeitsverzeichnis verwendet wird.
menu= Add Subst Drive #"Tooltip”: Bezeichnung, eigene Erklärung zu diesem Befehl.
button=shell32.dll,9
iconic=1 # Programmfenster minimiert, -oder- "0": Programmfenster maximiert ausführen
[em_subst-]
cmd=cmd #"Kommando": kompletter oder relativer Pfad zum gewünschten Programm, oder ein internes cm_xxx oder Benutzer Kommando em_xxx.
param=?/C subst /D %P:~0,-1
menu=Remove Subst Drive # "Tooltip”: Bezeichnung, eigene Erklärung zu diesem Befehl.
button=shell32.dll,10
#iconic= "1": Programmfenster minimiert, -oder- "0": Programmfenster maximiert ausführen
[em_subst]
cmd=cmd
param=/C echo. & echo. & echo mounted Subst Drives & echo =============================== & echo. & subst & echo. & echo =============================== & echo Please press anykey .. & pause >NUL
# path= "Startpfad": Arbeitsordner, bleibt meistens leer, da das gerade aktive Panel (Fenster) als Arbeitsverzeichnis verwendet wird.
menu= Show the Subst-drives # "Tooltip”: Bezeichnung, eigene Erklärung zu diesem Befehl.
button=shell32.dll,8
#iconic= "1" # Programmfenster minimiert, -oder- "0": Programmfenster maximiert ausführen
Meine Blackysgate.de/net
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos