Question environment variable [paths] %HOMEDRIVE%\%HOMEPATH%

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Question environment variable [paths] %HOMEDRIVE%\%HOMEPATH%

Post by *sidefx88 »

I'm using a key shorcut to go to a frequently used folder. The the command and relative path are "cd %HOMEDRIVE%\%HOMEPATH%\"

It points to the absolute path "C:\Users\John\"

But in the top of the panel, where the current path is shown, it shows this:

"C:\\Users\John\"

Double backlash after the drive letter. Maybe it is due to the double environmetn variable I used...

Cheers!
Last edited by sidefx88 on 2013-08-30, 14:20 UTC, edited 1 time in total.
I Love Total Commander!
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

It because you've added a extra backslash:
%HOMEDRIVE%\%HOMEPATH%\

%HOMEDRIVE% is the drive letter C:
%HOMEPATH% is the path on this drive \Users\John

Regards
Holger
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

So, I can set the command "cd %HOMEDRIVE%%HOMEPATH%" and it will work with no backlash in the middle?
I Love Total Commander!
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

I think so.
But the additional \ won't hurt.

Just open a command prompt:
"Commands -> Open command prompt window"
and type set to see how these variables are defined on your system.

Regards
Holger
Make our planet great again
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

Thanks!

It works fine using "cd %HOMEDRIVE%%HOMEPATH%" and the path is shown the right way now (no double \\).
I Love Total Commander!
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

sidefx88,
Please change topic title to some describing one, especially since it is not a TC bug. It is very inconvenient when there're no chance to get topic subject by its title.
User avatar
sidefx88
Senior Member
Senior Member
Posts: 294
Joined: 2007-04-11, 17:07 UTC
Location: Argentina

Post by *sidefx88 »

Sure! Sorry :)
I Love Total Commander!
Post Reply