PDA

Click to See Complete Forum and Search --> : PLEASE HELP ME WITH FTP!


chriskeeble
Aug 11th, 1999, 09:34 PM
How do you use file paths that contain spaces with the INet control?

If the local file's path has spaces in it how do I use it with the execute statment? (Or is there another way?)

eg.

Inet1.Execute , "PUT C:\My Programs\myfile.htm \myfile.htm"

(ie. there is a space in the local file's path: C:\My Programs\

Also - I need to be able to reliably check whether the file was put up there!!!

Please help I'm desperate now!!


------------------
Chris Keeble
www.giglist.com
mailto:chris.keeble@giglist.com

filburt1
Aug 19th, 1999, 04:43 AM
Check out this ActiveX control to use in place of the INet control.

DevPower FTP Control - http://www.devpower.com

(Freeware!)

filburt1
Aug 19th, 1999, 04:44 AM
Check out this ActiveX control to use in place of the INet control.

DevPower FTP Control - http://www.devpower.com

(Freeware!)

------------------
Arien Talabac, author of Tiny Clock, the skinnable alarm clock for Windows--check it out at http://tinyclock.tsx.org.

Aug 19th, 1999, 03:48 PM
You can't use names with spaces but you can get the short pathname and use that instead.

EXAMPLE: GetShortPath("C:\Program Files") would return "C:\Progra~1"


'Generel Dec
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

'Function
Function GetShortPath(sPath As String) As String
Dim sBuffer As String
sBuffer = String(255, vbNullChar)
GetShortPathName sPath, sBuffer, 255
GetShortPath = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
End Function



Hope it helps.
-Azzmodan