mkdir pre render script on rop geometry in XP

   5491   6   2
User Avatar
Member
119 posts
Joined: July 2005
Offline
hi all,

i canat seem to get the mkdir command to work in the pre render script of a rop geometry node.. i guess its just a syntax thing… i have..

mkdir $HIP/cache

with the intention of making a directory called cache in the hip folder.

ive tried a few variations but so far no directory is created.. is it the fact that mkdir is a shell command and $HIP is a houdini variable?

ta,

Mark
User Avatar
Member
483 posts
Joined: July 2005
Offline
Without even having Houdini in front of me, try the following:
run(“unix mkdir $HIP/cache”)
User Avatar
Member
119 posts
Joined: July 2005
Offline
nop.. that didnt work..

unix mkdir brings up the shell, but the error in it is mkdir:command not found..

yet if i go to the shell and do it manually (not including the $HIP) mkdir works.
User Avatar
Member
454 posts
Joined: July 2005
Offline
Try putting the command into a file and put that into the pre-render field.

Cheers
User Avatar
Staff
1072 posts
Joined: July 2005
Offline
spaceboyzero
is it the fact that mkdir is a shell command and $HIP is a houdini variable?

$HIP should be expanded before mkdir ever sees it, so that should not be a problem. The hscript command you're looking for is umkdir, not mkdir.
User Avatar
Member
119 posts
Joined: July 2005
Offline
sweet!

thanks
User Avatar
Member
7722 posts
Joined: July 2005
Offline
The reason why “unix mkdir $HIP/cache” doesn't work (eg. from the textport) is because on Windows, the csh.exe (from $HB) is spawned to execute the command. csh.exe is basically a native Windows port of the csh shell from Unix. So you need a mkdir.exe program in order to make a directory. To get one (and other Unix utilities on Windows), you need to download and install cygwin. And then make sure that the ccygwin/bin is available in the PATH environment variable prior to starting Houdini.

Of course, Ondrej gives a nice workaround because umkdir is a hscript command built into Houdini.
  • Quick Links