From a remote directory I have to automatically download a file of which I know part of the name, only (e.g. "file-vers.1.2.3.zip", where the version number is the unknown part).
Since neither wget nor curl accept the '*' special character in the paths, I suppose I need to download the directory contents first (the equivalent of ls or dir), parse it, extract the file name I need, check its version is newer that what I already have, and pass it to either wget or curl.
If there is no quicker way that this, my question is: how can I download the directory contents from an HTTPS and an SFTP repository?