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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Folder on Server?

Status
Not open for further replies.

rdgerken

Technical User
Jul 8, 2002
108
Can anyone provide an example of how to create a folder on the server from within an ASP application? (When the user sets up a new project, I want to create a folder on my server with a default set of folders based on the project number automatically).

I saw some information about the filesystem object and all that, but it seems to be using COM or something. What's the clean easy way in 2.0? :) lol
 
Use System.IO.Directory.Create("..")

Make sure you have permitions to do IO
 
yeah, that seems to work pretty good... I actually ended up using some other crazy code in order to do a "copy". Disappointing that the copy wasn't really built into that class. I'm sure there is a reason! :)
 
Yep, it's in the new "My.Computer.FileSystem" class that's been created in the second version of the framework and can be used to replace the System.IO methods:
Code:
My.Computer.FileSystem.CopyDirectory()


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top