As requested I've done some more testing with this, however I'm not getting any closer.
Just to reiterate, I'm trying to do a recursive download from an FTP Server to basically do a full backup. It works fine most of the time, but occasionally the Cwd command fails to change directory causing files to be downloaded in the wrong place. I was asked to check what error is bought up but unfortunately the FTPClient component doesn't generate an error via the OnError event (though it does for other things so I know I'm checking it right). There is no permissions problem - using the same username/password I can download everything via other FTP programs. The only error I get is that Cwd = false. I managed to trace the problem down to a simple test which fails every time - there seems to be a bug when changing between directories that are 3 or 4 layers deep i.e. Changing from '1/2/3/' to 'a/b/c/d' causes Cwd to fail. This happens regardless of which server I try it on and in which order I try to download the directories. Like I said in a previous email, with the following alteration the program works much better, but still fails on some directories: if not(Cwd) then begin Quit; Connect; HostDirName := SubDir; Cwd; end; Could anyone suggest a resolution or a better way to debug what's going on? Cheers Rick -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be