file list box problem across network drives 
Author Message
 file list box problem across network drives

A recap on my problem.
I have a standard file list box and in my code I do :-

FileList1.Path = source_dir
If FileList1.ListCount > 0 Then
' do xyz
End If

As expected this works fine on my local hard disk but if the files are
actually on a network drive then the ListCount returns zero and
nothing is displayed in the box even though there is actually files in
the directory when viewed with Explorer.

At first I thought this was some kind of latency problem so I tried
using the DoEvents function but to no avail.

However I found that Mystring = Dir(source_dir, vbNormal) returned the
files from the directory so that proved it wasn't a latency problem.

So after a bit of investigation I found it's something to do with
length of string used to set FileList1.Path

For Example
if I use something like source_dir = "t:\abc\def\ghi\jkl"  then
everything is fine
but if I use source_dir = "t:\myproject_1\project_data" then the file
list box doesn't see the directory contents.

I'll have to suss out what the actual limits are but why does this
only affect network drives , has anyone ever seen this

Ian Birbeck

Tue, 01 Oct 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. File List Box Problem on Network Drives

2. VB6 - file list box / drive box question - resolving network paths and computer names

3. Network drives in a drive list box control

4. Network Neighborhood in Drive List Box ??

5. Network Neighborhood in Drive List Box?

6. Problems when repeatedly reading a file across a simple Windows network

7. Nope, still don't got it -Map Network Drive across Domains

8. Using Control across a network drive...

9. Reading Drive Settings (BIOS or Drive List Box)

10. Where are File, Drive, and Directory list boxes?

11. Drive/Dir/File List Box Question

12. Automation: Problem Accessing Files From Network Drive


Powered by phpBB® Forum Software