[file dirname [file dirname [value root.name]]] should do it.

Nathan

On Apr 26, 2012, at 6:46 AM, "Rich Bobo" <richb...@mac.com> wrote:

> I tried...
> 
> [file dirname [value root.name]][cd ../Comp]
> 
> ...and it gives me the error "couldn't change working directory to "../Comp": 
> no such file or directory".  So, I'm thinking that I have to somehow embed 
> the cd command as part of the original dirname command. It seems that the cd 
> doesn't work because it's "outside" of that command and is handled as a 
> separate, unrelated command...
> 
> Rich
> 
> 
> On Apr 26, 2012, at 9:38 AM, Rich Bobo wrote:
> 
>> Howard,
>> 
>> Hmm... That just seems to append /../ to the path and doesn't actually 
>> perform the change directory command... Unless I'm missing something.
>> 
>> Thanks,
>> Rich
>> 
>> 
>> On Apr 26, 2012, at 9:14 AM, Howard Jones wrote:
>> 
>>> [file dirname  [value root.name]]/../
>>> to be more precise
>>>  
>>> Howard
>>> 
>>> From: Howard Jones <mrhowardjo...@yahoo.com>
>>> To: Nuke user discussion <nuke-users@support.thefoundry.co.uk> 
>>> Sent: Thursday, 26 April 2012, 14:11
>>> Subject: Re: [Nuke-users] Write node - TCL directory navigation question
>>> 
>>> [file dirname  [value root.name]]/../ [file tail [value root.name]] 
>>> should do it I think
>>>  
>>> Howard
>>> 
>>> From: Rich Bobo <richb...@mac.com>
>>> To: Nuke-Users Mailing List <nuke-users@support.thefoundry.co.uk> 
>>> Sent: Thursday, 26 April 2012, 13:57
>>> Subject: [Nuke-users] Write node - TCL directory navigation question
>>> 
>>> Hi,
>>> 
>>> Does anyone know how to indicate a relative directory change in TCL? In a 
>>> Write node, I'd like to designate the directory to write files to that is 
>>> parallel to the one the script is in. I'm using this typical form to get 
>>> the current script directory:
>>> 
>>> [file dirname [file tail [value root.name]]] 
>>> 
>>> Then, I'd like to do the equivalent of  'cd ../different_dir'. So, I'd like 
>>> to have a (hopefully short) chunk of code that would a) grab the script's 
>>> current directory, b) navigate up one directory and c) indicate the 
>>> parallel directory to write the files to. Should be easy - I just don't 
>>> know if it's possible with TCL or if I have to combine some Python in 
>>> there...
>>> 
>>> Thanks for any help!
>>> 
>>> Rich
>>> 
>>> 
>>> Rich Bobo
>>> Senior VFX Compositor
>>> 
>>> Mobile:  (248) 840-2665
>>> Web:  http://richbobo.com/
>>> 
>>> 
>>> _______________________________________________
>>> Nuke-users mailing list
>>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>> 
>>> 
>>> _______________________________________________
>>> Nuke-users mailing list
>>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>> 
>>> _______________________________________________
>>> Nuke-users mailing list
>>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>> 
>> _______________________________________________
>> Nuke-users mailing list
>> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> 
> _______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to