FSO equivalent in VB.net

G

Guest

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
 
M

Michael C

Ben said:
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
 
C

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
 
R

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.
 
A

aaron.kempf

it's not possible.. comparing vb6 to vb.net is like trying to call a
Windows API on a MAC.
it just doesn't work.

VB.net sucks run away while you still can.

Sorry; but I was in the same boat as you for a long time; and finally
realized that VB.net does NOTHING PRODUCTIVE except take an extra 10
seconds to launch.

..NET isn't even ready for production use; nobody can even tell me a
simple standard way to determine which version of the framework is on
machine X

they all ask 'oh what version of Windows' and 'oh what version do you
have installed' and 'under add/remove programs what version shows up'

and the punchline is that NOBODY CONSIDERED THIS DURING THE DESIGN
PHASE FOR THE FIRST VERSION OF .NET AND THEY STILL HAVENT FIXED THE
****ING PROBLEM.

You have to ask 30 questions before you can figure out 'what version of
the framework is on machine X'

the bottom line is that MS is going to kill VB.net anyways; so I'd just
run away to PHP or something

-Aaron
 
T

Tom Shelton

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,
 
B

Branco Medeiros

Ben wrote:
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.
<snip>

to which (e-mail address removed) replied:
it's not possible..
Sorry; but I was in the same boat as you for a long time; and finally
realized that VB.net does NOTHING PRODUCTIVE except take an extra 10
seconds to launch.
<snip>

I don't agree. I've been using VB from version 1.0 up to 6.0, and
resisted VB.Net a lot. But VB.Net 2005 won me over (even though I hate
the so called verbosity, the silly choice of keyword naming, and so
many other irritating things).

I started using VB Express to develop a few internal projects -- to
replace some Delphi inheritance we have here -- and become amazed by
the quality of the the results (yes, the compiler really sucks, but you
become used to it). I even managed to convince the powers that be here
to acquire Visual Studio 2005, so our bigger projects are being done in
VB.Net, now. With no regrets.

The turning point really happened when I was to test some ideas against
SQL Server and, instead of using good old VB.Classic as I usually did
for snippets and short tests, I went straight to VB.Net, without even
noticing.

Well, but I'm digressing. You'll find all sort of goodies in the
System.IO.File/Directory/Path classes. Hope you have fun.

Regards,

Branco.
 
A

aaron.kempf

yeah.. is that syntax COMPATIBLE WITH VB6?

WHY IN THE HELL IS IT 180 DEGREES DIFFERENT?

the answer is that MS gets a failing grade; and it's not practical to
convert FSO to vb.net.
How about you just continue to use FSO in vb.net?

Like seriously here.
Dont rewrite; keep things intact.


-Aaron
 
A

aaron.kempf

VB.net has no benefit of VB6.

VB.net is going away.

VB.net might as well be named 'the ugly red-headed stepchild to C#'
VB.net might as well be named 'the ugly red-headed stepchild to C#'
VB.net might as well be named 'the ugly red-headed stepchild to C#'
VB.net might as well be named 'the ugly red-headed stepchild to C#'

If you're going to use .NET learn C# instead of VB.net

VB 2005 won me over also-- for a couple of months.

when I realized that I couldnt' deliver projects in the same ballpark
as VB6; i fell off the wagon.

yes; it has some nice features.
but I don't see any compelling reason to buy into MS .Net strategy.
The only benefit is that you're tied to Windows.

I would rather use PHP.
PHP is by far the worlds most popular languages these days; at least
for web development www.netcraft.com

-Aaron
 
B

Branco Medeiros

VB.net has no benefit of VB6.

It allows me to program .Net in a case insensitive language that
doesn't use "{" "}" as block delimeters or ";" as statement terminator.
=)

VB 2005 won me over also-- for a couple of months.

when I realized that I couldnt' deliver projects in the same ballpark
as VB6; i fell off the wagon.

yes; it has some nice features.
but I don't see any compelling reason to buy into MS .Net strategy.
The only benefit is that you're tied to Windows.

*I am* tied to Windows, all right -- at least here, at my job. VB.Net
is clumsy, the compiler is slow, edit n' continue is ridiculous
(compared to what VB.classic provided), but, on the other side, I have:

a) A powerfull object oriented language. Inheritance rulez, I'd say, if
I was not this old. This alone would have been a reason to migrate to
VB.Net if it wasn't for the childish approach to naming the related
keywords... I hate the "MustInherit", "NotInheritable", etc
mambo-jambo. I'd really prefer the "official" terms, such as
"Abstract", "Final", "Virtual", etc. I guess the actual creators of
those abominations regret them now, but then, again, shite happens.

b) Generics. This is really great, and -- having some experience with
C++ -- something that I really missed. All that copy pasted code in
collection classes, argh... When VB.Net addopted generics, I knew it
would be hard not to try the language.

c) Multithreading. Not having to use DoEvents, PeekMessage and company
to keep the impression that the UI is alive while a lengthy operation
is going on -- and most of the things I must accomplish with coding are
lengthy opperations -- boy, that is liberating...

d) Delegates. Even though I allways preffered VB, I didn't refrain from
activelly using other languages -- mostly Delphi (because -- Turbo --
Pascal was my second language), and C++. The possibility allowed by
function pointers that these languages provided was something the VB
programmer in me allways envied. Not anymore. =))

Yes, there are inconsistencies in VB.Net that make me shiver whenever I
stumble on them -- and they're all over the place -- but I still prefer
this mutant -- and more powerfull -- language than any of the
alternatives presented so far: Delphi.Net, C#, managed C++, J#, Java,
IronPython, Ruby, PHP.Net, Boo, F# (m.f.g., when the "#" trend will
end?)
I would rather use PHP.
<snip>
I *use* PHP, thank you. wamp really rocks. But notice that I started
using PHP for web apps much before .Net and AspX. The out-of-the-box
experience of creating an ASP site doesn't come near to what
Dreamweaver + PHP + MySQL + Apache provide. Notice also that I still
didn't -- nor am intending to -- try AspX. But if the necessity
arrives, who knows?

Regards, and have fun.

Branco.
 
A

aaron.kempf

Branco;

I fully agree about ASPX: it's nice to see we agree on something :)

btw; WAMP? vs LAMP? Is WAMP really a good solution?

is there anyone that offers a virtual server image preconfigured for
WAMP and it also included PhpMyAdmin for example?

so you don't like the idea of VB 2007 getting named B#?
I think that we should put somehting on MSDN and we should all _VOTE_
on it.

Anyone know how to do that? I don't want to do it under my name;
they'll just block it :)

-Aaron
 
B

Branco Medeiros

btw; WAMP? vs LAMP? Is WAMP really a good solution?
I meant, wamp for in-house development (Windows machines, here). After
that, lamp, of course.

Regards,

Branco.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top