File System Objects v. Open for file IO 
Author Message
 File System Objects v. Open for file IO

What are the considerations when using file system objects versus Open For
to read and write files? Aside from its use in scripting, uncommon
functions, etc. What are the differences regarding system resources, best
practices, life of methods concerning .NET, CLI, etc. if you are doing
simple file read and writes. Excuse the cross-posting, I wanted to cover all
disciplines. Please reply to the group as well as myself.

Shane Miller



Wed, 22 Sep 2004 08:37:09 GMT  
 File System Objects v. Open for file IO

Quote:

> What are the considerations when using file system objects versus Open For
> to read and write files? Aside from its use in scripting, uncommon
> functions, etc. What are the differences regarding system resources, best
> practices, life of methods concerning .NET, CLI, etc. if you are doing
> simple file read and writes. Excuse the cross-posting, I wanted to cover all
> disciplines. Please reply to the group as well as myself.

SCRRUN is one of "those" DLLs, apparently compiled using Microslop's
internal-use-only "Accidental Compatibility" project setting.  New
releases of the Virus Broadcast System (VBS) tend to break existing
early-bound code using the FileSystemAbomination.

Any .NET implications are hardly worth worrying about, since you'll
have to trash, redesign, and rewrite everything from scratch anyway,
and don't look to the Migration Lizard to save your weekends!

 URL:http://devx.com/free/hotlinks/2002/ednote022002/ednote022002.asp

Here is but a partial list of the changes:

 URL:http://mvps.org/vb/rants/vfred.htm

Are we having fun yet?

--
Joe Foster <mailto:jlfoster%40znet.com>     On the cans? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Wed, 22 Sep 2004 09:01:00 GMT  
 File System Objects v. Open for file IO
If you're working in .NET, there's very little reason to use FSO. THe
System.IO namespace provides just about all the file-handling
functionality provided by FSO, and it's written in managed code. The
only thing I have found missing from System.IO is information on
physical drives, and that does require unmanaged code (either Win32
API or WMI) to retrieve. -- Ken

On Fri, 5 Apr 2002 18:37:09 -0600, "Shane Miller"

Quote:

>What are the considerations when using file system objects versus Open For
>to read and write files? Aside from its use in scripting, uncommon
>functions, etc. What are the differences regarding system resources, best
>practices, life of methods concerning .NET, CLI, etc. if you are doing
>simple file read and writes. Excuse the cross-posting, I wanted to cover all
>disciplines. Please reply to the group as well as myself.

>Shane Miller


-- Ken
MCW Technologies
http://www.mcwtech.com


Fri, 24 Sep 2004 23:26:33 GMT  
 File System Objects v. Open for file IO


Quote:
> SCRRUN is one of "those" DLLs, apparently compiled using Microslop's
> internal-use-only "Accidental Compatibility" project setting.  New
> releases of the Virus Broadcast System (VBS) tend to break existing
> early-bound code using the FileSystemAbomination.

Hi,

Can you please provide more information about this? We had a break with the
RegExp object a while back, but all the issues should be fixed now.

Peter

--

This must be the disclaimer I waited years to read:
http://www.microsoft.com/info/cpyright.htm



Sat, 09 Oct 2004 06:33:09 GMT  
 File System Objects v. Open for file IO

Quote:
> What are the considerations when using file system objects versus Open For
> to read and write files? Aside from its use in scripting, uncommon
> functions, etc. What are the differences regarding system resources, best
> practices, life of methods concerning .NET, CLI, etc. if you are doing
> simple file read and writes. Excuse the cross-posting, I wanted to cover
all
> disciplines. Please reply to the group as well as myself.

Hi,

You should look at using the new classes in System.IO.

Although you can still use the FileSystemObject, performance will suffer
somewhat due to COM interop, and you will not be able to operate under
restricted security policy (using COM requires UnmanagedCodePermission).

Note though that the FSO is still faster for some things. For example, if
you want to get the size of a directory, you can do this by accessing a
single property in the FSO (and it gets the info from the OS relatively
quickly) but in .NET you have to manually enumerate every file and
sub-directory recursively. This is not only much more code, it is also
orders of magnitude slower.

So the thing to do is use System.IO where you can, and resort to FSO if you
don't have security concerns and .NET doesn't provide a good alternative.

Peter

--

This must be the disclaimer I waited years to read:
http://www.microsoft.com/info/cpyright.htm



Sat, 09 Oct 2004 06:36:23 GMT  
 File System Objects v. Open for file IO

Please keep dotnet discussions OUT of <microsoft.public.vb.general.discussion>

thanks

        Bob O`BoB
--
posting from work, but representing only myself



Sat, 09 Oct 2004 06:54:16 GMT  
 File System Objects v. Open for file IO

Quote:


> > SCRRUN is one of "those" DLLs, apparently compiled using Microslop's
> > internal-use-only "Accidental Compatibility" project setting.  New
> > releases of the Virus Broadcast System (VBS) tend to break existing
> > early-bound code using the FileSystemAbomination.

> Hi,

> Can you please provide more information about this? We had a break with the
> RegExp object a while back, but all the issues should be fixed now.

There also seems to be compatibility b0rkage in the FileSystemAbomination:


Or, by "now", do you actually mean "post-5.6"?

--
Joe Foster <mailto:jlfoster%40znet.com>  Wanna buy a Bridge? <http://xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 09 Oct 2004 07:13:34 GMT  
 File System Objects v. Open for file IO

Quote:


> Please keep dotnet discussions OUT of <microsoft.public.vb.general.discussion>

> thanks

What, you'd rather he start sending out "cereal boxes", perhaps of
"Microsoft Developer Crunch"?

--
Joe Foster <mailto:jlfoster%40znet.com>  Auditine {*filter*} < http://www.*-*-*.com/ ;
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 09 Oct 2004 07:18:34 GMT  
 File System Objects v. Open for file IO
If someone would give me the DLL name and Entry point, I can put together a
.net Assembly to perform this operation and let people grab it.

Then the performance problem goes away and no need to use the FSO.

--
Joe Feser
Fesersoft
http://www.fesersoft.com/
.Net, XML, XSLT, SQL
Free Code, Articles and Information.



Quote:


> > What are the considerations when using file system objects versus Open
For
> > to read and write files? Aside from its use in scripting, uncommon
> > functions, etc. What are the differences regarding system resources,
best
> > practices, life of methods concerning .NET, CLI, etc. if you are doing
> > simple file read and writes. Excuse the cross-posting, I wanted to cover
> all
> > disciplines. Please reply to the group as well as myself.

> Hi,

> You should look at using the new classes in System.IO.

> Although you can still use the FileSystemObject, performance will suffer
> somewhat due to COM interop, and you will not be able to operate under
> restricted security policy (using COM requires UnmanagedCodePermission).

> Note though that the FSO is still faster for some things. For example, if
> you want to get the size of a directory, you can do this by accessing a
> single property in the FSO (and it gets the info from the OS relatively
> quickly) but in .NET you have to manually enumerate every file and
> sub-directory recursively. This is not only much more code, it is also
> orders of magnitude slower.

> So the thing to do is use System.IO where you can, and resort to FSO if
you
> don't have security concerns and .NET doesn't provide a good alternative.

> Peter

> --

> This must be the disclaimer I waited years to read:
> http://www.microsoft.com/info/cpyright.htm



Sat, 09 Oct 2004 09:40:00 GMT  
 File System Objects v. Open for file IO
<g>

Woof, Woof....

</Good dog.>

:-)

D.


| >
|
|
| Please keep dotnet discussions OUT of <microsoft.public.vb.general.discussion>
|
| thanks
|
|
| Bob O`BoB
| --
| posting from work, but representing only myself



Sat, 09 Oct 2004 12:39:27 GMT  
 File System Objects v. Open for file IO

seems to be compatibility b0rkage in the FileSystemAbomination:

Quote:



Thanks, I've passed this on.

Peter

--

This must be the disclaimer I waited years to read:
http://www.microsoft.com/info/cpyright.htm



Sat, 09 Oct 2004 23:31:00 GMT  
 File System Objects v. Open for file IO

Joe,

I have no access to non-Microsoft news servers from here at work.  Is this thread archived at groups.google?  Or could you just restate the FSO compatibility problem here?

<comment type='not-a-flame'>

Including "Micro-slams" in your posts may make you feel better, but it hardly seems like a very productive way to get help in Microsoft forums ;-)...

</comment>

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Sun, 10 Oct 2004 00:00:43 GMT  
 File System Objects v. Open for file IO

Quote:

> Joe,
> I have no access to non-Microsoft news servers from here at work.  Is
> this thread archived at groups.google?  Or could you just restate the
> FSO compatibility problem here?

This link ought to work for you:

 URL:http://news.devx.com/cgi-bin/dnewsweb.exe?utag=&group=vb.oop&xrelated...

Quote:
> Including "Micro-slams" in your posts may make you feel better, but it
> hardly seems like a very productive way to get help in Microsoft forums
> ;-)...

Then it's a good thing I wasn't the one with the problem!  Anyway,
when it comes to VB Classic, look to Micro$haft for disinformation
only and perhaps the occasional "cereal box", not for "help".

 URL:http://groups.google.com/groups?selm=PpBz52iOBHA.186%40cppssbbsa01.mi...

 URL:http://groups.google.com/groups?selm=%23bzKWjkOBHA.1788%40tkmsftngp03

--
Joe Foster <mailto:jlfoster%40znet.com>     Greed = God? <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sun, 10 Oct 2004 08:42:51 GMT  
 File System Objects v. Open for file IO

Quote:
> seems to be compatibility b0rkage in the FileSystemAbomination:



Hi,

The word is that we messed up the Type Library but were not aware of it for
almost two years. By that stage it was too late to revert back to the old
type library, because that would break applications compiled against the new
library.

Unfortunately there is not much we can do here except to apologise for the
mistake and point you to the work-around available at the site listed in the
news article (http://www.powervb.com/scrrun/).

Peter

--

This must be the disclaimer I waited years to read:
http://www.microsoft.com/info/cpyright.htm



Mon, 11 Oct 2004 11:43:40 GMT  
 File System Objects v. Open for file IO


Quote:
>This must be the disclaimer I waited years to read:
> http://www.*-*-*.com/

Why ? It's long and boring and doesn't seem to contain anything very
exciting or unexpected.

--
Alan Silver
Please remove the "{*filter*}ferret" if replying by e-mail



Sat, 16 Oct 2004 22:13:53 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. File locks when deleting files using SYSTEM.IO

2. trouble with system.io.file.copy

3. Changing File Permissions through File System Objects

4. File/Folder Object System and sorting files

5. rename a file with the file system object

6. File System Object & File Exists

7. File System Object (Loop through files)

8. Save file as UTF-8 in VB. (with file system object)

9. File IO and File Filter Problems

10. Opening a File Open window for file selection in VBA

11. Getting open file name w/o opening file

12. opening / saving files with MS rich text box control (viewing open files)

 

 
Powered by phpBB® Forum Software