Home All Groups Group Topic Archive Search About

FSO equivalent in VB.net

Author
5 Dec 2006 3:48 AM
Ben
Hi all,

I have been using the FSO object in in my Excel/ Access and VB 6 development
from the ScriptingRuntime library.  I am just starting to use a VS 2002 and
VS 2005 Express.  I am wondering if there is something equivalent in VS 2002
and later or how I can correctly use it?  Thanks for sharing your thoughts
and suggestions.

Ben

Author
5 Dec 2006 4:28 AM
Michael C
"Ben" <B**@discussions.microsoft.com> wrote in message
news:ADA78080-ECB7-460E-99FD-40C0CD4A7FBA@microsoft.com...
> Hi all,
>
> I have been using the FSO object in in my Excel/ Access and VB 6
> development
> from the ScriptingRuntime library.  I am just starting to use a VS 2002
> and
> VS 2005 Express.  I am wondering if there is something equivalent in VS
> 2002
> and later or how I can correctly use it?  Thanks for sharing your thoughts
> and suggestions.

Have a look in the System.IO namespace

Show quoteHide quote
>
> Ben
>
Author
5 Dec 2006 5:08 AM
Cor Ligthert [MVP]
Ben,

There is so much that it is almost impossible to point you.
Just tell us what you want to do, than we can give you a better answer.
Although the IO class as Michael showed you is of course as well a good
starting direction.

Cor

Show quoteHide quote
"Ben" <B**@discussions.microsoft.com> schreef in bericht
news:ADA78080-ECB7-460E-99FD-40C0CD4A7FBA@microsoft.com...
> Hi all,
>
> I have been using the FSO object in in my Excel/ Access and VB 6
> development
> from the ScriptingRuntime library.  I am just starting to use a VS 2002
> and
> VS 2005 Express.  I am wondering if there is something equivalent in VS
> 2002
> and later or how I can correctly use it?  Thanks for sharing your thoughts
> and suggestions.
>
> Ben
>
Author
5 Dec 2006 10:07 PM
Ben
Cor, Robin -

I have been using FSO to test for file/directory existence and creation in
place of VB and VBA's built-in function.  I love the flexibility and the
sytnax is more intuitive.

That is what I am hoping to do.  Thanks guys.

Ben

--



Show quoteHide quote
"Cor Ligthert [MVP]" wrote:

> Ben,
>
> There is so much that it is almost impossible to point you.
> Just tell us what you want to do, than we can give you a better answer.
> Although the IO class as Michael showed you is of course as well a good
> starting direction.
>
> Cor
>
> "Ben" <B**@discussions.microsoft.com> schreef in bericht
> news:ADA78080-ECB7-460E-99FD-40C0CD4A7FBA@microsoft.com...
> > Hi all,
> >
> > I have been using the FSO object in in my Excel/ Access and VB 6
> > development
> > from the ScriptingRuntime library.  I am just starting to use a VS 2002
> > and
> > VS 2005 Express.  I am wondering if there is something equivalent in VS
> > 2002
> > and later or how I can correctly use it?  Thanks for sharing your thoughts
> > and suggestions.
> >
> > Ben
> >
>
>
>
Author
6 Dec 2006 1:45 AM
Tom Shelton
On 2006-12-05, Ben <B**@discussions.microsoft.com> wrote:
> Cor, Robin -
>
> I have been using FSO to test for file/directory existence and creation in
> place of VB and VBA's built-in function.  I love the flexibility and the
> sytnax is more intuitive.
>
> That is what I am hoping to do.  Thanks guys.
>
> Ben
>

Imports System.IO

....

If File.Exists(pathToFile) Then
    ' Do Cool Stuff
End If

If Directory.Exists (pathToDirectory) Then
    ' Do Cool stuff
End If

HTH,

--
Tom Shelton
Author
6 Dec 2006 5:28 AM
Cor Ligthert [MVP]
Ben,

In this page you see in extention to Tom, as well how to create a directory.

http://msdn2.microsoft.com/en-us/library/system.io.directory.aspx

I hope this helps,

Cor

Show quoteHide quote
"Tom Shelton" <tom_shel***@comcastXXXXXXX.net> schreef in bericht
news:dKCdnQYFEdsrvevYnZ2dnUVZ_rKdnZ2d@comcast.com...
> On 2006-12-05, Ben <B**@discussions.microsoft.com> wrote:
>> Cor, Robin -
>>
>> I have been using FSO to test for file/directory existence and creation
>> in
>> place of VB and VBA's built-in function.  I love the flexibility and the
>> sytnax is more intuitive.
>>
>> That is what I am hoping to do.  Thanks guys.
>>
>> Ben
>>
>
> Imports System.IO
>
> ...
>
> If File.Exists(pathToFile) Then
> ' Do Cool Stuff
> End If
>
> If Directory.Exists (pathToDirectory) Then
> ' Do Cool stuff
> End If
>
> HTH,
>
> --
> Tom Shelton
Author
7 Dec 2006 3:13 AM
Ben
Tom, Cor -

Thank you both.  That definitely helps.

Ben

--



Show quoteHide quote
"Ben" wrote:

> Cor, Robin -
>
> I have been using FSO to test for file/directory existence and creation in
> place of VB and VBA's built-in function.  I love the flexibility and the
> sytnax is more intuitive.
>
> That is what I am hoping to do.  Thanks guys.
>
> Ben
>
> --
>   
>
>
> "Cor Ligthert [MVP]" wrote:
>
> > Ben,
> >
> > There is so much that it is almost impossible to point you.
> > Just tell us what you want to do, than we can give you a better answer.
> > Although the IO class as Michael showed you is of course as well a good
> > starting direction.
> >
> > Cor
> >
> > "Ben" <B**@discussions.microsoft.com> schreef in bericht
> > news:ADA78080-ECB7-460E-99FD-40C0CD4A7FBA@microsoft.com...
> > > Hi all,
> > >
> > > I have been using the FSO object in in my Excel/ Access and VB 6
> > > development
> > > from the ScriptingRuntime library.  I am just starting to use a VS 2002
> > > and
> > > VS 2005 Express.  I am wondering if there is something equivalent in VS
> > > 2002
> > > and later or how I can correctly use it?  Thanks for sharing your thoughts
> > > and suggestions.
> > >
> > > Ben
> > >
> >
> >
> >
Author
5 Dec 2006 7:12 AM
RobinS
Check out the FileInfo and DirectoryInfo classes.

As Cor said, if you give us an idea what you're trying to do,
we can make more precise suggestions.

Robin S.
-----------------------
Show quoteHide quote
"Ben" <B**@discussions.microsoft.com> wrote in message
news:ADA78080-ECB7-460E-99FD-40C0CD4A7FBA@microsoft.com...
> Hi all,
>
> I have been using the FSO object in in my Excel/ Access and VB 6
> development
> from the ScriptingRuntime library.  I am just starting to use a VS 2002
> and
> VS 2005 Express.  I am wondering if there is something equivalent in VS
> 2002
> and later or how I can correctly use it?  Thanks for sharing your thoughts
> and suggestions.
>
> Ben
>