Jump to content
  • Advertisement
Sign in to follow this  
GreenToad

Unity [web] Modifying folders with asp and vbscript

This topic is 5411 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm helping code a website for the local community college using asp with vbscript. They need to be able to create folders and change folder options (the folders in question reside on the server) like sharing and share permissions using only asp and vbscript. Is it even possible to create folders and change their options and permissions? Google has yielded me nothing on this topic and any help is much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
As long as the folders are sever-side, you can create and alter them with the VBScript FileSystemObject.

To create and initialise the object and create a folder... Remember you can omit the MapPath command if you have access to the entire drive and this allows you to specify absolute paths.


strFolderName = Server.MapPath( "folder" )
fso = Server.CreateObject( "Scripting.FileSystemObject" )
If Not fso.FolderExists( strFolderName )
fso.CreateFolder( strFolderName )
End If




To view or change folder options, take a look at the example on W3Schools.

Permissions are a little more difficult, however you may wish to invoke a command line script from ASP (perhaps Cacls or similar) to set the NT permissions of your folder or files.

I'm assuming that your group owns the server and is proficient in setting up the IIS account to allow the scripts to execute certain files and indeed has the rights to create and alter file/folder permissions.

EDIT: The link to Cacls was broken

[Edited by - evolutional on September 26, 2004 8:18:42 AM]

Share this post


Link to post
Share on other sites
Thanks for the reply, I'll look into the scripting idea (yes, we own the server), as it sounds like the thing to do. Thanks again!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!