Indeed JoeBAR, there is a common bug in most of newdir. Newdir assumes the file/directory the user created/deleted is in their current working directory. Here's an example on how the virtualpath should be found:
Code:
## If the path begins with a slash, the user specified
## the absolute path, rather than the relative path.
set args "MKD /path/to/a/cool/dir"
set dir [join [lrange [split $args] 1 end]]
if {[string index $dir 0] == "/"} {
set vpath $dir
} else {
set vpath "$pwd$dir"
}
(Similar to the "GetPath" function in nxLib.itcl for nxAutoNuke/nxTools for those who use them.)