AnsweredAssumed Answered

vrf FileSytemObject (scrrun.dll)

Question asked by jvera on Apr 17, 2001
Lyle,

You are right. In addition I've discovered that the method .GetFolder(path)
updates the Files.Item keys property with the filenames located under the
directory specified by path (it seems silly).

I'm now wondering if the collection Files produced by GetFolder method can
populate the Dictionary object.

Best Regards.

Juan.

jvera@indra.es
www.indra.es


-----Original Message-----
From: lyle_carnahan@agilent.com [mailto:lyle_carnahan@agilent.com]
Sent: Tuesday, April 17, 2001 6:04 PM
To: jvera@indra.es; vrf@lvld.agilent.com
Subject: RE: vrf VRF: FileSytemObject (scrrun.dll)



Juan,

I believe that when using the Files object and the Item method the Key entry
is not number but is a member of the "Dictionary" object. I found this
information in the Microsoft Platform SDK. I found this out while using the
FileSystemObject in VB and trying to do exactly what you are attempting. In
VB an error message similar to "integer cannot be converted to text" or "key
not found" was returned (or something like this). The workaround in VB was
to use the "FOR EACH object IN object" syntax to cycle through each file in
the collection but there is no equivalent for this in VEE.

The only workarounds I could suggest would be to create an Active-X
component in VB which has specific methods and properties for your needs
that makes calls to the Scripting object and use that in VEE. Or revert back
to the "old" method of executing the DOS DIR command and re-directing the
result to a file.

Regards,

Lyle Carnahan
Technical Consultant
Agilent Technologies
lyle_carnahan@agilent.com

-----Original Message-----
From: "Vera Fernndez, Juan" [mailto:jvera@indra.es]
Sent: Monday, April 16, 2001 10:29 AM
To: vrf@lvld.agilent.com
Subject: vrf VRF: FileSytemObject (scrrun.dll)


Following the example from Lyle Carnahan I did try to use the
FileSystemObject AxA provided in the scrrun.dll to produce a folder listing
but it fails when accessing to property File(Key).Item (see attached file).

Does any of you know a workaround or solution ?

Regards.


Juan Vera
jvera@indra.es <mailto:jvera@indra.es>
www.indra.es <http://www.indra.es/>

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes