By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,492 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

HARD-CORE GURUS ONLY - Early Vs Late Binding question

P: n/a
I need to use late binding in a project because it's company standard
to not include references which aren't MS defaults, so I can't add the
scripting runtime.

I need to be able to search folders (and sub-forders) for a file name,
and then copy the file to a specified directory (at the moment it's
C:\TempCD but that will change later.

All I have so far is the following, I believe my main issue to tackle
is to figure out how to get to sub-folders:

Private Function CheckFile(strPath As String)
Dim FrmScreen As Form_ScrMainScreens
Dim X As Integer

DoCmd.Hourglass True
Set FrmScreen = Scr(mvFormId)

Dim db As Database
Dim rec As dao.Recordset
Dim ICN_Name As String
Dim G, Y, z As Variant
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CodeProject.Connection

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

Dim filFile As Object, fdrFolder As Object, fdrSubFolder As Object
Dim fsoSysObj As Object, FL As Object, FLS As Object

Set fsoSysObj = CreateObject("Scripting.FileSystemObject")
Set z = fsoSysObj.Drives("Y")
Set fdrFolder = z.RootFolder
If fsoSysObj.FolderExists(strPath) Then
MsgBox "Im here"
Else
MsgBox "Failed"
End If

Set G = fsoSysObj.GetFolder(strPath).Files

For Each FL In G
Debug.Print (FL.Path)
Next FL

'THIS IS WHERE IT DIES

Set Y = G.getSubFolders
For Each FL In Y
Debug.Print (FL.Name)
Next FL

Set fdrFolder = fsoSysObj.GetFolder(strPath).subfolder
Set fdrFolder = CreateObject("Scripting.Folder")
Set fdrSubFolder = CreateObject("Scripting.Folder")
Set filFile = CreateObject("Scripting.File")

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

For G = 0 To X - 1
ICN_Name = CmboMulti.List(G)

'************************************************* ****
'************************************************* ****
' This procedure returns all the files in a directory into
' a Dictionary object. If called recursively, it also returns
' all files in subfolders.

' Loop through Files collection

For Each filFile In fdrFolder.Files
If filFile.Name = ICN_Name & ".pdf" Then
fsoSysObj.copyfile filFile.Path, "C:\TempCD\"
End If
Next filFile

For Each fdrSubFolder In fdrFolder.SubFolders
Y = CheckFile2(fdrSubFolder.Path, ICN_Name)
If Y = True Then
GoTo FDRSRCH
End If
Next fdrSubFolder

'************************************************* ****
FDRSRCH:
Next G

MsgBox "Medical Request Forms have been copied to C:\TempCD\"

For G = 0 To X - 1
DoCmd.SetWarnings True
MsgBox "Right-Click on the report body and print to PDF. Remember to
include 'CC' after the ICN # to differentiate between the CC Sheet and
Medical Request Forms."
DoCmd.OpenReport "rptAdmin_CcWorksheet", acViewPreview, , "Icn = '" &
CmboMulti.List(G) & "'", acDialog
Next G

cnn.Close
Set cnn = Nothing

DoCmd.Hourglass False

End Function

Private Function CheckFile2(strPath As String, ICN_Name As String) As
Variant
Dim FrmScreen As Form_ScrMainScreens
Dim X As Integer

DoCmd.Hourglass True
Set FrmScreen = Scr(mvFormId)

Dim db As Database
Dim rec As dao.Recordset
Dim G As Variant
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CodeProject.Connection

Set fsoSysObj = CreateObject("Scripting.FileSystemObject")
Set fdrFolder = CreateObject("Scripting.Folder")
Set fdrSubFolder = CreateObject("Scripting.Folder")
Set filFile = CreateObject("Scripting.File")

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

For Each filFile In fdrFolder.Files
If filFile.Name = ICN_Name & ".pdf" Then
fsoSysObj.copyfile filFile.Path, "C:\TempCD\"
CheckFile2 = "True"
GoTo FDRSRCH
End If
Next filFile

For Each fdrSubFolder In fdrFolder.SubFolders
Call CheckFile2(fdrSubFolder.Path, ICN_Name)
Next fdrSubFolder

FDRSRCH:
End Function

Jul 20 '06 #1
Share this Question
Share on Google+
21 Replies


P: n/a
There is a function demonstrating how to list files recursively (without
using any external references) here:
http://allenbrowne.com/ser-59.html

It behaves a little differently than the scripting does, as it identifies
zip files as files instead of failing to list them or listing their
contents.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ManningFan" <ma********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
>I need to use late binding in a project because it's company standard
to not include references which aren't MS defaults, so I can't add the
scripting runtime.

I need to be able to search folders (and sub-forders) for a file name,
and then copy the file to a specified directory (at the moment it's
C:\TempCD but that will change later.

All I have so far is the following, I believe my main issue to tackle
is to figure out how to get to sub-folders:

Private Function CheckFile(strPath As String)
Dim FrmScreen As Form_ScrMainScreens
Dim X As Integer

DoCmd.Hourglass True
Set FrmScreen = Scr(mvFormId)

Dim db As Database
Dim rec As dao.Recordset
Dim ICN_Name As String
Dim G, Y, z As Variant
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CodeProject.Connection

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

Dim filFile As Object, fdrFolder As Object, fdrSubFolder As Object
Dim fsoSysObj As Object, FL As Object, FLS As Object

Set fsoSysObj = CreateObject("Scripting.FileSystemObject")
Set z = fsoSysObj.Drives("Y")
Set fdrFolder = z.RootFolder
If fsoSysObj.FolderExists(strPath) Then
MsgBox "Im here"
Else
MsgBox "Failed"
End If

Set G = fsoSysObj.GetFolder(strPath).Files

For Each FL In G
Debug.Print (FL.Path)
Next FL

'THIS IS WHERE IT DIES

Set Y = G.getSubFolders
For Each FL In Y
Debug.Print (FL.Name)
Next FL

Set fdrFolder = fsoSysObj.GetFolder(strPath).subfolder
Set fdrFolder = CreateObject("Scripting.Folder")
Set fdrSubFolder = CreateObject("Scripting.Folder")
Set filFile = CreateObject("Scripting.File")

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

For G = 0 To X - 1
ICN_Name = CmboMulti.List(G)

'************************************************* ****
'************************************************* ****
' This procedure returns all the files in a directory into
' a Dictionary object. If called recursively, it also returns
' all files in subfolders.

' Loop through Files collection

For Each filFile In fdrFolder.Files
If filFile.Name = ICN_Name & ".pdf" Then
fsoSysObj.copyfile filFile.Path, "C:\TempCD\"
End If
Next filFile

For Each fdrSubFolder In fdrFolder.SubFolders
Y = CheckFile2(fdrSubFolder.Path, ICN_Name)
If Y = True Then
GoTo FDRSRCH
End If
Next fdrSubFolder

'************************************************* ****
FDRSRCH:
Next G

MsgBox "Medical Request Forms have been copied to C:\TempCD\"

For G = 0 To X - 1
DoCmd.SetWarnings True
MsgBox "Right-Click on the report body and print to PDF. Remember to
include 'CC' after the ICN # to differentiate between the CC Sheet and
Medical Request Forms."
DoCmd.OpenReport "rptAdmin_CcWorksheet", acViewPreview, , "Icn = '" &
CmboMulti.List(G) & "'", acDialog
Next G

cnn.Close
Set cnn = Nothing

DoCmd.Hourglass False

End Function

Private Function CheckFile2(strPath As String, ICN_Name As String) As
Variant
Dim FrmScreen As Form_ScrMainScreens
Dim X As Integer

DoCmd.Hourglass True
Set FrmScreen = Scr(mvFormId)

Dim db As Database
Dim rec As dao.Recordset
Dim G As Variant
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Set cnn = CodeProject.Connection

Set fsoSysObj = CreateObject("Scripting.FileSystemObject")
Set fdrFolder = CreateObject("Scripting.Folder")
Set fdrSubFolder = CreateObject("Scripting.Folder")
Set filFile = CreateObject("Scripting.File")

If Len(strPath) < 3 Then
strPath =
"\\Cca-audit\dfs-dc-01\Imaging\Client\Out\CMS\MedicalRecords\"
End If

For Each filFile In fdrFolder.Files
If filFile.Name = ICN_Name & ".pdf" Then
fsoSysObj.copyfile filFile.Path, "C:\TempCD\"
CheckFile2 = "True"
GoTo FDRSRCH
End If
Next filFile

For Each fdrSubFolder In fdrFolder.SubFolders
Call CheckFile2(fdrSubFolder.Path, ICN_Name)
Next fdrSubFolder

FDRSRCH:
End Function

Jul 21 '06 #2

P: n/a
"Allen Browne" <Al*********@SeeSig.Invalidwrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
There is a function demonstrating how to list files recursively
(without using any external references) here:
http://allenbrowne.com/ser-59.html

It behaves a little differently than the scripting does, as it
identifies zip files as files instead of failing to list them or
listing their contents.
That nice reference aside, can the FSO simply not be used with late
binding?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '06 #3

P: n/a
Yes, probably it's main place of use is in scripting where you don't have
any other choice.

--

Terry Kreft
"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
news:Xn**********************************@127.0.0. 1...
"Allen Browne" <Al*********@SeeSig.Invalidwrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
There is a function demonstrating how to list files recursively
(without using any external references) here:
http://allenbrowne.com/ser-59.html

It behaves a little differently than the scripting does, as it
identifies zip files as files instead of failing to list them or
listing their contents.

That nice reference aside, can the FSO simply not be used with late
binding?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jul 21 '06 #4

P: n/a
"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
<Xn**********************************@127.0.0.1> :
"Allen Browne" <Al*********@SeeSig.Invalidwrote in
news:44***********************@per-qv1-newsreader-01.iinet.net.au:
>There is a function demonstrating how to list files recursively
(without using any external references) here:
http://allenbrowne.com/ser-59.html

It behaves a little differently than the scripting does, as it
identifies zip files as files instead of failing to list them or
listing their contents.

That nice reference aside, can the FSO simply not be used with late
binding?
One can use late binding with all of the scripting objects. I should
think the below should work, as long as scripting is enabled on your
setup.

Public Function SearchFiles(ByRef fldr As Object)

Dim fl As Object
Dim f As Object

Debug.Print fldr.Path

For Each f In fldr.Files
Debug.Print , f.Name
Next f

For Each fl In fldr.SubFolders
SearchFiles fl
Next fl

End Function

Sub SearchAllFiles()
Dim fso As Object
Dim strPath As String

strPath = "c:" ' or narrow it down a bit ;-)
Set fso = CreateObject("scripting.filesystemobject")
SearchFiles fso.GetFolder(strPath)
End Sub

--
Roy-Vidar
Jul 21 '06 #5

P: n/a
RoyVidar <ro*************@yahoo.nowrote in
news:mn***********************@yahoo.no:
One can use late binding with all of the scripting objects. I
should think the below should work, as long as scripting is
enabled on your setup.
Why was the original poster having the problem, then? Was it an
error that would have occurred with early binding as well?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '06 #6

P: n/a
"David W. Fenton" <XX*******@dfenton.com.invalidwrote in message
<Xn**********************************@127.0.0.1> :
RoyVidar <ro*************@yahoo.nowrote in
news:mn***********************@yahoo.no:
>One can use late binding with all of the scripting objects. I
should think the below should work, as long as scripting is
enabled on your setup.

Why was the original poster having the problem, then? Was it an
error that would have occurred with early binding as well?
That's hard for me to say, but I think I'll guess that the error
might stem from the OP being unfamiliar with these objects.

The hint for the OP, is probably to develop using early binding,
and switch to late binding closer to deployment, if they still
intend to use this library.

Then I think they would have found there's no getSubFolders
property, but there's a SubFolders property of a folder object,
returning a collection of the subfolders of that folder.

--
Roy-Vidar
Jul 21 '06 #7

P: n/a
On 20 Jul 2006 10:45:16 -0700, "ManningFan" <ma********@gmail.comwrote:
>I need to use late binding in a project because it's company standard
to not include references which aren't MS defaults, so I can't add the
scripting runtime.
I suppose the company policy relates to avoiding version dependency, but scripting is something many
admins turn off so late binding could produce a nasty surprise further down the line.
I would follow Allen's suggestion.

Jul 21 '06 #8

P: n/a
jim blunt <do**@ask.comwrote in
news:l7********************************@4ax.com:
On 20 Jul 2006 10:45:16 -0700, "ManningFan" <ma********@gmail.com>
wrote:
>>I need to use late binding in a project because it's company
standard to not include references which aren't MS defaults, so I
can't add the scripting runtime.

I suppose the company policy relates to avoiding version
dependency, but scripting is something many admins turn off so
late binding could produce a nasty surprise further down the line.
I would follow Allen's suggestion.
Is there some fashion in which that error would not be trappable?
That is, if the scripting runtime is not installed, then the effort
to instantiate a scripting object should fail with a trappable error
number. One would need only to find out what it is and then handle
the error. For that matter, as long as you have error handling in
your procedure that instantiates the object, you should be safe.
Might be a good idea to write a sub that does nothing but
instantiate the object, so you would know exactly what the error
applies to.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '06 #9

P: n/a
On Fri, 21 Jul 2006 16:00:13 -0500, "David W. Fenton" <XX*******@dfenton.com.invalidwrote:
>jim blunt <do**@ask.comwrote in
news:l7********************************@4ax.com :
>On 20 Jul 2006 10:45:16 -0700, "ManningFan" <ma********@gmail.com>
wrote:
>>>I need to use late binding in a project because it's company
standard to not include references which aren't MS defaults, so I
can't add the scripting runtime.

I suppose the company policy relates to avoiding version
dependency, but scripting is something many admins turn off so
late binding could produce a nasty surprise further down the line.
I would follow Allen's suggestion.

Is there some fashion in which that error would not be trappable?
That is, if the scripting runtime is not installed, then the effort
to instantiate a scripting object should fail with a trappable error
number. One would need only to find out what it is and then handle
the error. For that matter, as long as you have error handling in
your procedure that instantiates the object, you should be safe.
Might be a good idea to write a sub that does nothing but
instantiate the object, so you would know exactly what the error
applies to.
But even if you trapped the error how would you use the program if you are not allowed to use
scripting?

Jul 21 '06 #10

P: n/a
jim blunt <do**@ask.comwrote in
news:mc********************************@4ax.com:
On Fri, 21 Jul 2006 16:00:13 -0500, "David W. Fenton"
<XX*******@dfenton.com.invalidwrote:
>>jim blunt <do**@ask.comwrote in
news:l7********************************@4ax.co m:
>>On 20 Jul 2006 10:45:16 -0700, "ManningFan"
<ma********@gmail.comwrote:

I need to use late binding in a project because it's company
standard to not include references which aren't MS defaults, so
I can't add the scripting runtime.

I suppose the company policy relates to avoiding version
dependency, but scripting is something many admins turn off so
late binding could produce a nasty surprise further down the
line. I would follow Allen's suggestion.

Is there some fashion in which that error would not be trappable?
That is, if the scripting runtime is not installed, then the
effort to instantiate a scripting object should fail with a
trappable error number. One would need only to find out what it is
and then handle the error. For that matter, as long as you have
error handling in your procedure that instantiates the object, you
should be safe. Might be a good idea to write a sub that does
nothing but instantiate the object, so you would know exactly what
the error applies to.

But even if you trapped the error how would you use the program if
you are not allowed to use scripting?
Depends on how crucial that feature is to the app. Many Access apps
could function perfectly well without it, even though those features
that depended on it would not be available. It all depends on how
limiting this is to the app in question.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 21 '06 #11

P: n/a
On Fri, 21 Jul 2006 21:58:19 GMT, jim blunt <do**@ask.comwrote:

Your app would have to "gracefully degrade" if FSO is not available.

I once wrote an app that used Ms MapPoint to show maps. It wasn't a
critical feature of the app. If user chooses the option, CreateObject
would fail, I would trap the error and display a message that mapping
was dependent on MapPoint being installed.
Big advantage of late binding in this case was that otherwise the app
would work fine, whereas with early binding it would fail at startup.

-Tom.
>On Fri, 21 Jul 2006 16:00:13 -0500, "David W. Fenton" <XX*******@dfenton.com.invalidwrote:
>>jim blunt <do**@ask.comwrote in
news:l7********************************@4ax.co m:
>>On 20 Jul 2006 10:45:16 -0700, "ManningFan" <ma********@gmail.com>
wrote:

I need to use late binding in a project because it's company
standard to not include references which aren't MS defaults, so I
can't add the scripting runtime.

I suppose the company policy relates to avoiding version
dependency, but scripting is something many admins turn off so
late binding could produce a nasty surprise further down the line.
I would follow Allen's suggestion.

Is there some fashion in which that error would not be trappable?
That is, if the scripting runtime is not installed, then the effort
to instantiate a scripting object should fail with a trappable error
number. One would need only to find out what it is and then handle
the error. For that matter, as long as you have error handling in
your procedure that instantiates the object, you should be safe.
Might be a good idea to write a sub that does nothing but
instantiate the object, so you would know exactly what the error
applies to.

But even if you trapped the error how would you use the program if you are not allowed to use
scripting?
Jul 22 '06 #12

P: n/a

RoyVidar wrote:
That's hard for me to say, but I think I'll guess that the error
might stem from the OP being unfamiliar with these objects.
WAIT!!! you mean he's not a HARD-CORE GURU? I guess he's just excluded
himself from his own club! (Wow, that must be lonely!)

Jul 22 '06 #13

P: n/a
On Fri, 21 Jul 2006 18:48:15 -0700, Tom van Stiphout <no*************@cox.netwrote:
>
Your app would have to "gracefully degrade" if FSO is not available.

I once wrote an app that used Ms MapPoint to show maps. It wasn't a
critical feature of the app. If user chooses the option, CreateObject
would fail, I would trap the error and display a message that mapping
was dependent on MapPoint being installed.
Big advantage of late binding in this case was that otherwise the app
would work fine, whereas with early binding it would fail at startup.

-Tom.

Hang on, Allen suggested some code which doesn't require scripting and I recommended the OP to use
it and so avoid the need for any sort of degredation.
Maybe there is a phrase for this too, "avoiding unnecessary trouble" perhaps.

My question "how would you use the program if you are not allowed to use scripting" was being
sarcastic I'm afraid.
Jul 22 '06 #14

P: n/a
jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.com:
Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the need
for any sort of degredation. Maybe there is a phrase for this too,
"avoiding unnecessary trouble" perhaps.
It is true that Allen provided an alternative way of accomplishing
what the OP asked about. But there are features that FSO provides
that can *not* be replicated in any other way (such as the network
drive availability function). I need to check for LAN availability
in all my replicated apps where laptop users want to synch with the
LAN when they are connected to it. The FSO would provide a
completely reliable way to do that. I could make the FSO method the
default and if it fails use the less reliable method (with Dir(),
which can return false positives), or I could just try synchronizing
and trap the failure which would be inevitable when not connected to
the LAN. However, there is only one error that Jet will return in
that situation, and it could mean either that the replica is not
there on the LAN or that the LAN is not there, so I'd prefer to test
for the real case.

It was my kind of situation that I was thinking of when I made the
point about late binding with FSO.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 22 '06 #15

P: n/a
David W. Fenton wrote:
jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.com:
Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the need
for any sort of degredation. Maybe there is a phrase for this too,
"avoiding unnecessary trouble" perhaps.

It is true that Allen provided an alternative way of accomplishing
what the OP asked about. But there are features that FSO provides
that can *not* be replicated in any other way (such as the network
drive availability function).
Allen Browne has or had a function called at_CheckNet% at his website
for checking the availability of network drives and printers.

James A. Fortune
CD********@FortuneJames.com

Jul 23 '06 #16

P: n/a
CD********@FortuneJames.com wrote in
news:11**********************@b28g2000cwb.googlegr oups.com:
David W. Fenton wrote:
>jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.com :
Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the
need for any sort of degredation. Maybe there is a phrase for
this too, "avoiding unnecessary trouble" perhaps.

It is true that Allen provided an alternative way of
accomplishing what the OP asked about. But there are features
that FSO provides that can *not* be replicated in any other way
(such as the network drive availability function).

Allen Browne has or had a function called at_CheckNet% at his
website for checking the availability of network drives and
printers.
That sounds great, but I can't find any such function. I do see
http://allenbrowne.com/func-11.html, but that's not necessarily what
you're referring to (though it may work in all cases -- I don't know
whether the Access commands used there will always return
appropriate results).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 23 '06 #17

P: n/a
On Sun, 23 Jul 2006 14:13:07 -0500, "David W. Fenton" <XX*******@dfenton.com.invalidwrote:
>CD********@FortuneJames.com wrote in
news:11**********************@b28g2000cwb.googleg roups.com:
>David W. Fenton wrote:
>>jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.co m:

Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the
need for any sort of degredation. Maybe there is a phrase for
this too, "avoiding unnecessary trouble" perhaps.

It is true that Allen provided an alternative way of
accomplishing what the OP asked about. But there are features
that FSO provides that can *not* be replicated in any other way
(such as the network drive availability function).

Allen Browne has or had a function called at_CheckNet% at his
website for checking the availability of network drives and
printers.

That sounds great, but I can't find any such function. I do see
http://allenbrowne.com/func-11.html, but that's not necessarily what
you're referring to (though it may work in all cases -- I don't know
whether the Access commands used there will always return
appropriate results).
Google finds http://www.groupacg.com/ACodeTip.htm#CHKNET
Jul 23 '06 #18

P: n/a
On Sun, 23 Jul 2006 20:10:04 GMT, polite person <he**@home.comwrote:
>On Sun, 23 Jul 2006 14:13:07 -0500, "David W. Fenton" <XX*******@dfenton.com.invalidwrote:
>>CD********@FortuneJames.com wrote in
news:11**********************@b28g2000cwb.google groups.com:
>>David W. Fenton wrote:
jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.com :

Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the
need for any sort of degredation. Maybe there is a phrase for
this too, "avoiding unnecessary trouble" perhaps.

It is true that Allen provided an alternative way of
accomplishing what the OP asked about. But there are features
that FSO provides that can *not* be replicated in any other way
(such as the network drive availability function).

Allen Browne has or had a function called at_CheckNet% at his
website for checking the availability of network drives and
printers.

That sounds great, but I can't find any such function. I do see
http://allenbrowne.com/func-11.html, but that's not necessarily what
you're referring to (though it may work in all cases -- I don't know
whether the Access commands used there will always return
appropriate results).

Google finds http://www.groupacg.com/ACodeTip.htm#CHKNET
but I was going to add before I pressed the button, VBNet has a set of routines under
network/connection which may be newer.

Jul 23 '06 #19

P: n/a
polite person <he**@home.comwrote in
news:t6********************************@4ax.com:
but I was going to add before I pressed the button, VBNet has a
set of routines under network/connection which may be newer.
What is VBNet? I assume you don't mean the Florida ISP at vbnet.com.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 24 '06 #20

P: n/a
polite person <he**@home.comwrote in
news:3r********************************@4ax.com:
On Sun, 23 Jul 2006 14:13:07 -0500, "David W. Fenton"
<XX*******@dfenton.com.invalidwrote:
>>CD********@FortuneJames.com wrote in
news:11**********************@b28g2000cwb.google groups.com:
>>David W. Fenton wrote:
jim blunt <do**@ask.comwrote in
news:2e********************************@4ax.com :

Hang on, Allen suggested some code which doesn't require
scripting and I recommended the OP to use it and so avoid the
need for any sort of degredation. Maybe there is a phrase for
this too, "avoiding unnecessary trouble" perhaps.

It is true that Allen provided an alternative way of
accomplishing what the OP asked about. But there are features
that FSO provides that can *not* be replicated in any other way
(such as the network drive availability function).

Allen Browne has or had a function called at_CheckNet% at his
website for checking the availability of network drives and
printers.

That sounds great, but I can't find any such function. I do see
http://allenbrowne.com/func-11.html, but that's not necessarily
what you're referring to (though it may work in all cases -- I
don't know whether the Access commands used there will always
return appropriate results).

Google finds http://www.groupacg.com/ACodeTip.htm#CHKNET
Ah, so it was neither Allen Browne's nor called CheckNet, so that
explains why I as unable to find it.

Thanks for the pointer.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jul 24 '06 #21

P: n/a
On Sun, 23 Jul 2006 21:20:04 -0500, "David W. Fenton" <XX*******@dfenton.com.invalidwrote:
>polite person <he**@home.comwrote in
news:t6********************************@4ax.com :
>but I was going to add before I pressed the button, VBNet has a
set of routines under network/connection which may be newer.

What is VBNet? I assume you don't mean the Florida ISP at vbnet.com.
http://vbnet.mvps.org/

a classic VB (not VB.net) code site
Jul 24 '06 #22

This discussion thread is closed

Replies have been disabled for this discussion.