-- Returns a complete path to the parent of the current directory.
--                                                  -- CBT: 2004.10.12
--
on cdup(me, howmany, thisPath)
  
  if (ilk(thisPath)=#string) then pathStr = thisPath
  else pathStr = the moviePath
  
  if (ilk(howmany)=#integer) then levels = howmany
  else levels = 1
  
  tD = the itemDelimiter
  D = the last char of the moviePath
  the itemDelimiter = D
  itemCount = the number of items in pathStr
  
  newPath = (item 1 to itemCount - levels - 1 of pathStr) &D
  
  the itemDelimiter = tD
  
  return newPath
end