Thread: FtpSetCurrentDirectory

  1. #1
    Registered User The15th's Avatar
    Join Date
    Aug 2001


    Hi all;

    All im trying to do is set the directory on a FTP server and display the files inside that directory.

    first i set all files and directories on the server inside a list box;
    then i get the user's dblclk and get the text pos and store inside WhatDir
    then i FtpSetCurrentDirectory(hService,WhatDir);

    then i display all files using FtpFindFirstFile and InternetFindNextFile
    should work, shouldnt it?

    But each time i try this i get no files displayed.

    thanks heaps for your help!
    arrh, i got nothing good to say.

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Are you just doing...
    WhatDir = SendMessage(hList, LB_GETCURSEL, 0, 0);
    which is not correct...

    or are you using
    pos = SendMessage(hList, LB_GETCURSEL, 0, 0);
    SendMessage(hList, LB_GETTEXT, 0, (LPARAM)WhatDir); //WhatDir is a char array (string)
    which is correct...

    Maybe you should post some code?

Popular pages Recent additions subscribe to a feed