Hi,
We provide php scripts to be run directly on the servers, you don't need to use ftp in this case. From the PHP image compression tool, you can select the folder and subfolders where you want to apply the compression, see:
https://www.imagerecycle.com/documentation/how-to-compress-images-and-pdf-using-php-script If you don't have access to server side and only have a ftp access we don't have pre built system to do this.
You can still use the api directly and build the tool you need based on the environment you have.
Best regards