Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6 KiB

  1. <%
  2. 'The physical directory may not currently
  3. 'exist in the metabase, so we have
  4. 'to find the closest parent associated with
  5. 'the dir and read the properties.
  6. 'assumes the following are defined:
  7. ' currentobj
  8. ' path
  9. ' dirkeytype
  10. Dim fpbaseobj, fpnewname, fpnewobj
  11. if (Session("vtype") = "dir") then
  12. fpbaseobj = path
  13. if err = 0 then
  14. 'set the KeyType if it isn't already set...
  15. if currentobj.KeyType = "" then
  16. currentobj.KeyType = dirkeyType
  17. currentobj.SetInfo
  18. Set currentobj=GetObject(currentobj.ADsPath)
  19. end if
  20. else
  21. Do While err <> 0
  22. 'response.write currentobj.ADsPath
  23. 'we need clear our path not found error..
  24. err = 0
  25. 'and cyle through the fpbaseobj till we find the next whack,
  26. 'building up the path in new name as we go
  27. Do Until Right(fpbaseobj,1) = "/"
  28. fpnewname = Right(fpbaseobj,1) & fpnewname
  29. fpbaseobj = Mid(fpbaseobj,1,Len(fpbaseobj)-1)
  30. Loop
  31. 'add the whack to the beginning of the path...
  32. fpnewname = "/" & fpnewname
  33. 'response.write "<!-- " & fpnewname & "-->"
  34. 'lop off the last whack...
  35. fpbaseobj = Mid(fpbaseobj,1,Len(fpbaseobj)-1)
  36. 'and try to set the object again...
  37. Set currentobj=GetObject(fpbaseobj)
  38. Response.write ""
  39. Loop
  40. 'lop off the first whack...
  41. fpnewname = Mid(fpnewname,2)
  42. 'Response.write currentobj.ADsPath & "<BR>"
  43. 'Response.write dirkeytype & "<BR>"
  44. 'Response.write fpnewname & "<BR>"
  45. Set fpnewobj=currentobj.Create(dirkeyType, fpnewname)
  46. fpnewobj.SetInfo
  47. 'response.write fpnewobj.ADsPath
  48. Set currentobj=GetObject(fpnewobj.ADsPath)
  49. end if
  50. end if
  51. %>