Imagemagick provides the identify
tool, which works perfectly for what I need. I use it on Ubuntu, with Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114.
Here is how I use it:
$ identify "ftp://SERVERNAME:PASSWORD@HOST/DIRECTORY/FILE.pdf"
But when the directory or file has got a space in the name, I get an error as if it doesn't find the file.
Any solution?
NOTE: I've tried with \
, \\
, %20
or ^
before spaces, but it doesn't solve this issue.
Error : "identify-im6.q16: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504. no data returned"
(same message as if I didn't write the correct name of the file).
Your issue could be because you're using double quotes. Try using single quotes instead around the URL to the FTP server. For example, here I'm using the free FTP service mentioned in this other SO Q&A titled: Is there a Public FTP server to test upload and download?.
I was able to find another site that allows you to upload files, https://dlptest.com/ftp-test/. In using this, I believe this replicates your issue:
This looks like a bug with Imagemagick's handling of URLs. This is the version that I'm using:
At any rate I see you've asked in the Imagemagick forums about this issue - Identify ftp and spaces.