dcsimg
Results 1 to 10 of 10

Thread: [RESOLVED] INET Control Resolving Spaces In Directory Name

  1. #1

    Thread Starter
    Lively Member ADF-Sniper's Avatar
    Join Date
    Sep 2005
    Location
    Melbourne, Australia
    Posts
    92

    Resolved [RESOLVED] INET Control Resolving Spaces In Directory Name

    Hi All,

    I am having issues with Inet and CD into the remote directory with space in the directory name. Please keep in mind that I can not change the name of the directory.

    'afolder = "Amay Karting"
    Inet1.Execute , "CD /GameData/Locations/" & afolder
    Inet1.Execute , "DIR"

    I have been trying to resolve this issue for a few weeks.

    If there is no solution I use ezftp.ocx. If I can be showen how to get a directory listing going for that ill get rid of inet control.

    If anyone knows the solution to this issue, could you please be a big help

    Regards
    Nathum
    Evolution is just so unlikely to produce complex life forms.


  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: INET Control Resolving Spaces In Directory Name

    AFAIK
    CD uses virtual directories not physical
    the syntax is "CD virtual directory name"
    following your post (assuming that they are virtual, I should use next way
    Code:
    Inet1.Execute , "CD GameData"
    Inet1.Execute , "CD Locations"
    Inet1.Execute , "CD " &  afolder & Chr(34)

  3. #3

    Thread Starter
    Lively Member ADF-Sniper's Avatar
    Join Date
    Sep 2005
    Location
    Melbourne, Australia
    Posts
    92

    Re: INET Control Resolving Spaces In Directory Name

    Hi I tried that and did not work.

    I have also tried %20%
    Code:
    (000594) 24/03/2009 12:34:01 PM - rfserver1 (122.111.168.58)> CWD /GameData/Locations/Amay%20%Karting
    (000594) 24/03/2009 12:34:01 PM - rfserver1 (122.111.168.58)> 550 CWD failed. "/GameData/Locations/Amay%20%Karting": directory not found.
    I have also tried putting the Chr(34) infront and end of the string as suggested in some forums and no result.

    Thanks
    Nath
    Evolution is just so unlikely to produce complex life forms.


  4. #4
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: INET Control Resolving Spaces In Directory Name

    Try this...

    I am doing this from the top of my head

    Code:
    'afolder = "Amay Karting"
    afolder = Chr(34) & "Amay Karting" & Chr(34)
    or this

    Code:
    Sub Test()
        afolder = "Amay Karting"
        bfolder = "/GameData/Locations/" & afolder
        Ret = "CD """ & bfolder & """"
        MsgBox Ret
    End Sub
    Last edited by Siddharth Rout; Mar 24th, 2009 at 02:02 AM.
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  5. #5

    Thread Starter
    Lively Member ADF-Sniper's Avatar
    Join Date
    Sep 2005
    Location
    Melbourne, Australia
    Posts
    92

    Re: INET Control Resolving Spaces In Directory Name

    Hi Kool,

    I tried that before and now. That did not work

    Code:
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> TYPE A
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> 200 Type set to A
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> PORT 122,111,168,58,12,40
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> 200 Port command successful
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> LIST
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> 150 Opening data channel for directory list.
    (000601) 24/03/2009 18:00:05 PM - rfserver1 (122.111.168.58)> 226 Transfer OK
    afolder = Chr(34) & "Amay Karting" & Chr(34)

    Inet1.Execute , "CD /GameData/Locations/" & afolder
    Do While Inet1.StillExecuting
    DoEvents
    Loop
    Inet1.Execute , "DIR"
    Do While Inet1.StillExecuting
    DoEvents
    Loop

    Thanks
    Nathum
    Evolution is just so unlikely to produce complex life forms.


  6. #6
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: INET Control Resolving Spaces In Directory Name

    I just edited the above post... how about the second code?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  7. #7

    Thread Starter
    Lively Member ADF-Sniper's Avatar
    Join Date
    Sep 2005
    Location
    Melbourne, Australia
    Posts
    92

    Re: INET Control Resolving Spaces In Directory Name

    Quote Originally Posted by koolsid View Post
    Code:
    Sub Test()
        afolder = "Amay Karting"
        bfolder = "/GameData/Locations/" & afolder
        Ret = "CD """ & bfolder & """"
        MsgBox Ret
    End Sub
    My result is....

    "CD "/GameData/Locations/Amay Karting""

    I used that and inet loops.... Inet1.StillExecuting

    Thanks
    Nathum
    Evolution is just so unlikely to produce complex life forms.


  8. #8
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: INET Control Resolving Spaces In Directory Name

    Did you try something like this?

    Code:
    Private Sub Command2_Click()
        afolder = "Amay Karting"
        bfolder = "/GameData/Locations/" & afolder
        Ret = "CD """ & bfolder & """"
        Inet1.Execute , Ret
    End Sub
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

  9. #9

    Thread Starter
    Lively Member ADF-Sniper's Avatar
    Join Date
    Sep 2005
    Location
    Melbourne, Australia
    Posts
    92

    Thumbs up Re: INET Control Resolving Spaces In Directory Name

    Mate! thats it!

    Top stuff, if you ever head over my way IOU a Beer or two

    Code:
    (000624) 24/03/2009 18:28:50 PM - rfserver1 (122.111.168.58)> CWD /GameData/Locations/Amay Karting
    (000624) 24/03/2009 18:28:50 PM - rfserver1 (122.111.168.58)> 250 CWD successful. "/GameData/Locations/Amay Karting" is current directory.

    Thanks Heaps
    Nathum
    Evolution is just so unlikely to produce complex life forms.


  10. #10
    Super Moderator Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    11,998

    Re: INET Control Resolving Spaces In Directory Name

    Quote Originally Posted by ADF-Sniper View Post
    Mate! thats it!

    Top stuff, if you ever head over my way IOU a Beer or two

    Code:
    (000624) 24/03/2009 18:28:50 PM - rfserver1 (122.111.168.58)> CWD /GameData/Locations/Amay Karting
    (000624) 24/03/2009 18:28:50 PM - rfserver1 (122.111.168.58)> 250 CWD successful. "/GameData/Locations/Amay Karting" is current directory.

    Thanks Heaps
    Nathum
    Glad to be of help

    make sure that the beer is very chilled
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved

    Microsoft MVP: 2011 - 2015 IMP Links : Acceptable Use Policy, FAQ
    MyGear:
    OMEN by HP - 15-ce073tx with Win10+Office 2013. || Mac Book Pro (10.6.8) with Office 2011

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width