Results 1 to 4 of 4

Thread: PLEASE HELP ME WITH FTP!

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 1999
    Location
    UK
    Posts
    13

    Post

    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:[email protected]

  2. #2

    Post

    Check out this ActiveX control to use in place of the INet control.

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

    (Freeware!)

  3. #3

    Post

    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.

  4. #4
    Guest

    Post

    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"

    Code:
    '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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width