Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inet ftp, spaces in folder saving to

Status
Not open for further replies.

ahart976

Programmer
Mar 20, 2001
4
0
0
GB
Is there a method whereby you can save to a folder using the inet.execute get statement where the folder you are saving to has a space in its name. So far example:

inet1.execute,"GET afile.txt C:\folder with space\afile.txt"

this does not work but this does

inet1.execute,"GET afile.txt C:\foldernospace\afile.txt"

as there is no space in the folders name.

I took quite a while to figure out that it was this that was causing an error as worked on some machines and not on others.

Any help appreciated

Thanks
 
According to the ms documentation folder (directory) names with spaces are not supported. :(
 
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal lBuffer As Long) As Long
Public Function GetShortPath(strFileName As String) As String
'KPD-Team 1999
'URL: 'E-Mail: KPDTeam@Allapi.net
Dim lngRes As Long, strPath As String
'Create a buffer
strPath = String$(165, 0)
'retrieve the short pathname
lngRes = GetShortPathName(strFileName, strPath, 164)
'remove all unnecessary chr$(0)'s
GetShortPath = Left$(strPath, lngRes)
End Function
Private Sub Form_Load()
MsgBox GetShortPath("c:\Program Files\")
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top