RobertT687
Programmer
The following bit of code is giving me problems:
Sub DoesItExist()
Dim FTPLocation As String
Dim SearchFor As String
Dim tmpFile As String
Dim FoundName As String
FTPLocation = "\\Server\Folder\SubFolder\"
SearchFor = "*.388"
tmpFile = FTPLocation & SearchFor
FoundName = Dir(tmpFile)
Msgbox "Found Name is " & FoundName, vbOKOnly, "Status"
Exit Sub
When run from designer in VB5 on my PC it works fine.
When compiled and executed on my PC it works fine.
When the same .exe build is executed on another machine, I get error 52 (Bad file name or number).
If FTPLocation is changed to "Drive:\Folder\SubFolder\" (the mapped equivalent of the UNC path)
and executed on the other machine,
I don't get error 52, I get an empty string returned in FoundName.
What am I missing?
The path and file both absolutely exist.
It shouldn't be a permissions problem. The directory is open to Everyone by design.
Any ideas?
Thanks in advance.
Sub DoesItExist()
Dim FTPLocation As String
Dim SearchFor As String
Dim tmpFile As String
Dim FoundName As String
FTPLocation = "\\Server\Folder\SubFolder\"
SearchFor = "*.388"
tmpFile = FTPLocation & SearchFor
FoundName = Dir(tmpFile)
Msgbox "Found Name is " & FoundName, vbOKOnly, "Status"
Exit Sub
When run from designer in VB5 on my PC it works fine.
When compiled and executed on my PC it works fine.
When the same .exe build is executed on another machine, I get error 52 (Bad file name or number).
If FTPLocation is changed to "Drive:\Folder\SubFolder\" (the mapped equivalent of the UNC path)
and executed on the other machine,
I don't get error 52, I get an empty string returned in FoundName.
What am I missing?
The path and file both absolutely exist.
It shouldn't be a permissions problem. The directory is open to Everyone by design.
Any ideas?
Thanks in advance.