Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error -2147023545 WHENfso.CreateFolder

Status
Not open for further replies.

fortage

MIS
Jun 15, 2000
329
US
set f = fso.CreateFolder("\\Domain1\dfs$\" & OU & "\users\" & SamName)
This does not work when using a DFS link in Windows 2000. It does however work with a share name. Any ideas why?

 
In order to help, can you define a "DFS link" ? Water is not bad as long as it stays out human body ;-)
 
Questions :
1) Have you an error or does it just don't create your folder without telling you why ?
2) if you try to call a getFolder method on the DFS, does it work ?
3) As you're talking about WMI, did you think of using the "Win32_CreateFolderAction" method in WMI ? Water is not bad as long as it stays out human body ;-)
 
bugger

>it seems to be you have to use wmi when >dealing with dfs.this must mean u can treat >dfs links the same as shares.


^^ i meant "can't treat dfs links the same as shares"

sorry ===============
Security Forums
 
Thanks for all of the quick replies, here is my current code "in an ASP page" running on W2K. The script DOES work as .vbs but not as an ASP page. Again the link is a DFS(Distributed File Sytem) share.

Set fso = CreateObject("Scripting.FileSystemObject")
set f = fso.CreateFolder("\\Domain-01\dfs$\" & OU & "\users\" & SamName)
fso.CopyFolder "\\Domain-01\dfs$\\" & OU & "\users\userdef\*", "\\Domain-01\dfs$\" & OU & "\users\" & SamName
 
You're gonna think I take you for a stupid guy but that's not the case. I ask my question :
In ASP, did you change the code
Code:
Set fso = CreateObject("Scripting.FileSystemObject")
to
Code:
Set fso =
server.
Code:
CreateObject("Scripting.FileSystemObject")
?
Water is not bad as long as it stays out human body ;-)
 
Great pickup Targol. I did not have the "server." part of the command. When I change it I was able to create the folder. Why would the code have worked for a standard share and not a DFS link without the "server."?

Having the code work without the "server." had me stumped.

Thanks for all the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top