How to create a folder?

  • Thread starter Thread starter ad
  • Start date Start date
A

ad

I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------------
------------------------------------------------------

dim objfso=server.createobject("scripting.filesystemobject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSettings("RealUserhomePath") &
"\" & gpname)
end if
 
ad said:
I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------------
------------------------------------------------------

dim objfso=server.createobject("scripting.filesystemobject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSettings("RealUserhomePath") &
"\" & gpname)
end if

That's going a pretty indirect route. I'd suggest using
Directory.CreateDirectory.
 
Hello ad,

You ought to learn more about .NET Framework. All the file manipulation related
classes are under System.IO namespace.
 
Thank,
I have read the help articles about System.IO namespace. There are many
classes can deal with foldesr
..
After creating a directory, I want to set the right to some user groups or
users, How can I do?
 
Back
Top