$HFS - Why does it have "~" in the path ??
5266
8
3
Feb. 22, 2018 10:55 a.m.
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
goldfarb
Staff
3455 posts
Joined: July 2005
Offline
Feb. 22, 2018 11:20 a.m.
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
Feb. 22, 2018 11:24 a.m.
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
goldfarb
Staff
3455 posts
Joined: July 2005
Offline
Feb. 22, 2018 11:34 a.m.
that path will still work to get the location.
Michael Goldfarb |
www.odforce.net Training Lead
SideFX
www.sidefx.com
Feb. 22, 2018 11:40 a.m.
Oh ok, I'll try to work directly with $HFS then and I won't evaluate it (so it doesn't return that shorthand).
goldfarb
Staff
3455 posts
Joined: July 2005
Offline
Feb. 22, 2018 11:53 a.m.
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
Feb. 22, 2018 11:54 a.m.
Oh perfect!
Thanks for that
pbowmar
Member
7025 posts
Joined: July 2005
Offline
Feb. 22, 2018 3:14 p.m.
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…
jsmack
Member
7803 posts
Joined: Sept. 2011
Offline
Feb. 22, 2018 7:32 p.m.
Think of it as a blessing. There is still stuff that breaks when spaces are in the path.