0 votes
by (160 points)

Hello, When I try to delete a directory which contains only one file eg. 'Thumbs.db'. then I get an exception like directory is non empty. When I call GetList() it does not return the system files so how can I solve this issue? Is there any way to force delete directory or can I get a list of hidden files?


1 Answer

0 votes
by (58.9k points)

Hello, it happens quite often on unix FTP servers that hidden files are not listed. There is an option 'ForceListHiddenFiles' which forces such servers to list also hidden files. Please use it like this:

        Ftp ftp = new Ftp();
        ftp.Settings.ForceListHiddenFiles = true;

        // connect & login

        foreach (var item in ftp.GetList())


Does GetList() method return also 'Thumbs.db' now?