Some ftp servers have more advanced features through the "SITE" command, which might be able to do what you want. Failing that, a lot of servers support a "recursive ls listing" (which makes this job a lot easier), but it is unfortunately turned off on a lot of servers, since it can be used for DOS attack.
So, before looking further for an app to do this, I'd check if your server supports one of these methods.