in ASP-vbscript, I can use the GetFolder method of FileSystemObject to get the contents inside a folder if i pass the location of the folder
Set fso = CreateObject("Scripting.FileSystemObject")
Set folder = fso.GetFolder(Server.MapPath("myfolder"))
Can i use the same method with a url instead of foldername
like
Set folder = fso.GetFolder("http://www.mysite.com/myfolder/")
When trying this i am getting error
Microsoft VBScript runtime error '800a004c'
Path not found
I manage the开发者_如何学Python "mysite.com" site.So i can make any folder permissions if needed.
Any thoughts ?
No you cannot, the FileSystemObject
is exclusively for managing files.
Within ASP you can use the Server.MapPath()
method to get the physical path for a relative path or you can use Request.ServerVariables("APPL_PHYSICAL_PATH")
to get the base physical path of your application and then use these paths with the FileSystemObject
but it won't accept URLs
I may be wrong but it should however accept UNC paths so you should be able to connect to network drives to which your computer can connect.
精彩评论