Equivalent of FIleSystemObject in C#

  • Thread starter Thread starter Bob Miller
  • Start date Start date
B

Bob Miller

I am try to convert the following routine into C#

dim oFSO
set oFSO = CreateObject("Scripting.FilesystemObject")

dim sHomePath
sHomePath = '\\server\c$\home\'

dim oFolder
Set oFolder = oFSO.CreateFolder(sHomePath & 'BOB')

What should I use instead of the filesystem object?

Cheers

Bob
 
Bob Miller said:
I am try to convert the following routine into C#

dim oFSO
set oFSO = CreateObject("Scripting.FilesystemObject")

dim sHomePath
sHomePath = '\\server\c$\home\'

dim oFolder
Set oFolder = oFSO.CreateFolder(sHomePath & 'BOB')

What should I use instead of the filesystem object?

I don't know if you're looking for this or what.

http://preview.tinyurl.com/2akps5
 
Mr. Arnold said:
I don't know if you're looking for this or what.

http://preview.tinyurl.com/2akps5

I'm actually trying to do the same thing as "Active Directory Users &
Computers" does when you use the "%username%" variable in the home drive
definition of a user account.

But this article might be helpful in starting me down the right path

Cheers

Bob
 
Hi Bob,

The functionality you're looking for is in the System.IO namespace. To
create a directory, you can use Directory.Create(string path).

Regards,
Bram
 
Thanks Bram

Bram said:
Hi Bob,

The functionality you're looking for is in the System.IO namespace. To
create a directory, you can use Directory.Create(string path).

Regards,
Bram
 
Now that I can add in some more permissions, I need to modify some of the
inherited permissions, but only for this directory
How do a copy the inherited permissions, and then stop inheritance (this
should let me modify the permissions)

Thanks Heaps

Bob
 
Back
Top