Hi
I’m using the GetAttr() function to determine whether the contents of a folder is either a file or another folder using
If (GetAttr(stPath & stName) And vbDirectory) = vbDirectory Then
The problem is that I’m getting a runtime error when I query some files. I think this is because the files are held on a LAN and the full path and filename string is greater than 256 characters. And presumably GetAttr cannot accept strings greater than 256 as input.
Can someone confirm that?
I cannot shorten the pathname (because so many users already use the path) and I can’t force a mapped drive (say X: = \\servername\group\etc. and then use the mapped drive letter instead of the full pathname) because the user population is widespread and I cannot determine every user.
Does anyone know of a different way to tell if an item is a folder or file without this string length problem?
Or is there another way to do this altogether
Thanks
I’m using the GetAttr() function to determine whether the contents of a folder is either a file or another folder using
If (GetAttr(stPath & stName) And vbDirectory) = vbDirectory Then
The problem is that I’m getting a runtime error when I query some files. I think this is because the files are held on a LAN and the full path and filename string is greater than 256 characters. And presumably GetAttr cannot accept strings greater than 256 as input.
Can someone confirm that?
I cannot shorten the pathname (because so many users already use the path) and I can’t force a mapped drive (say X: = \\servername\group\etc. and then use the mapped drive letter instead of the full pathname) because the user population is widespread and I cannot determine every user.
Does anyone know of a different way to tell if an item is a folder or file without this string length problem?
Or is there another way to do this altogether
Thanks