Discussion:
Equivalent of FIleSystemObject in C#
(too old to reply)
Bob Miller
2007-07-17 02:27:10 UTC
Permalink
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
Mr. Arnold
2007-07-17 04:11:29 UTC
Permalink
Post by 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?
I don't know if you're looking for this or what.

http://preview.tinyurl.com/2akps5
Bob Miller
2007-07-17 05:30:19 UTC
Permalink
Post by Mr. Arnold
Post by 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?
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
Bram
2007-07-17 12:07:42 UTC
Permalink
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
Post by Bob Miller
Post by Mr. Arnold
Post by 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?
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
Bob Miller
2007-07-17 22:08:18 UTC
Permalink
Thanks Bram
Post by Bram
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
Post by Bob Miller
Post by Mr. Arnold
Post by 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?
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
Bob Miller
2007-07-18 05:13:55 UTC
Permalink
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
Post by Bob Miller
Thanks Bram
Post by Bram
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
Post by Bob Miller
Post by Mr. Arnold
Post by 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?
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
Loading...