$HFS - Why does it have "~" in the path ??

   5200   8   3
User Avatar
Member
10 posts
Joined: July 2014
Offline
Hey,

I want to use the $HFS variable from inside Houdini, but it's set to:


HFS = 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.268'


It was set like that by default.

Is there another way I can interpret this variable (or any other variable) to find the absolute path of the install location?

I want to see this:

HFS = 'C:\Program Files\Side Effects Software\Houdini 16.5.268'

Cheers
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
it's like that because Houdini doesn't like spaces in paths…
what are you intending to use the variable for?
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: July 2014
Offline
I want to know where the install location is because I want to run something outside of Houdini by directly accessing the hython/python files.

I can work around it no problem (by just doing a filesystem scan), but I thought I would just ask around here about the “~” anyway.

Cheers
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
that path will still work to get the location.
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: July 2014
Offline
Oh ok, I'll try to work directly with $HFS then and I won't evaluate it (so it doesn't return that shorthand).
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you can also use python
try this is a python shell:
print hou.getenv(“HFS”)
print hou.getenv(“HOUDINI_VERSION”)
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
10 posts
Joined: July 2014
Offline
Oh perfect!

Thanks for that
User Avatar
Member
7024 posts
Joined: July 2005
Offline
I think it's like that because Windows originally only allowed 8 characters in file/directory names (why would you ever want more, “visionary” Bill Gates asked) and you still see that (known as 8 dot 3 naming) in Windows sometimes. No idea why HFS is doing that though, lots of Windows env vars have spaces and are much longer…
User Avatar
Member
7740 posts
Joined: Sept. 2011
Offline
Think of it as a blessing. There is still stuff that breaks when spaces are in the path.
  • Quick Links