473,397 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

FSO equivalent in VB.net

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

Dec 5 '06 #1
13 9693
"Ben" <Be*@discussions.microsoft.comwrote in message
news:AD**********************************@microsof t.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
>
Ben

Dec 5 '06 #2
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" <Be*@discussions.microsoft.comschreef in bericht
news:AD**********************************@microsof t.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

Dec 5 '06 #3
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.
-----------------------
"Ben" <Be*@discussions.microsoft.comwrote in message
news:AD**********************************@microsof t.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

Dec 5 '06 #4
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
FUCKING 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

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" <Be*@discussions.microsoft.comschreef in bericht
news:AD**********************************@microsof t.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
>
Dec 6 '06 #5
On 2006-12-05, Ben <Be*@discussions.microsoft.comwrote:
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
Dec 6 '06 #6
Ben wrote:
<snip>
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 aa*********@gmail.com replied:
it's not possible..
<snip>
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.

Dec 6 '06 #7
Ben,

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

http://msdn2.microsoft.com/en-us/lib...directory.aspx

I hope this helps,

Cor

"Tom Shelton" <to*********@comcastXXXXXXX.netschreef in bericht
news:dK******************************@comcast.com. ..
On 2006-12-05, Ben <Be*@discussions.microsoft.comwrote:
>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

Dec 6 '06 #8
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

Tom Shelton wrote:
On 2006-12-05, Ben <Be*@discussions.microsoft.comwrote:
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
Dec 6 '06 #9
Ben
Tom, Cor -

Thank you both. That definitely helps.

Ben

--

"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" <Be*@discussions.microsoft.comschreef in bericht
news:AD**********************************@microsof t.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
>
Dec 7 '06 #10
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


Branco Medeiros wrote:
Ben wrote:
<snip>
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 aa*********@gmail.com replied:
it's not possible..
<snip>
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.
Dec 7 '06 #11
aa*********@gmail.com wrote (inline):
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.
=)

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

Dec 8 '06 #12
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

Branco Medeiros wrote:
aa*********@gmail.com wrote (inline):
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.
=)

<snip>
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.
Dec 8 '06 #13

aa*********@gmail.com wrote:
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.

Dec 8 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
3
by: Robert Dodier | last post by:
Hello, Here's a thought that I'm sure has already occurred to someone else, I just can't find any record of it yet. An XML document is just a more verbose and clumsy representation of an...
1
by: Vannela | last post by:
Is there any equivalent control in .NET for the Power builder DataWindow control? I am explaining the Datawindow architecture to some extent. Power Builder DataWindow Control has got different...
6
by: Frank Rachel | last post by:
So I can focus on the correct areas of research, I was wondering if someone could give me the .NET equivelents for this J2EE architecture: JSP's make calls to local JavaBean Controls. The...
3
by: Marty | last post by:
Hi, What is the VB.NET equivalent of the VB6 ADODB.Connector and ADODB.Recordset? Thanks Marty
7
by: Tim Conner | last post by:
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s :...
10
by: karch | last post by:
How would this C# contruct be represented in C++/CLI? Or is it even possible? PolicyLevel level = (enumerator->Current) as PolicyLevel; Thanks, Karch
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.