I'm trying to list all files in my SFTP server from a top level folder in Node.js using the npm module ssh2-sftp-client. However, I cannot find any documentation or previous posts which discuss whether using a wildcards in the file paths is possible. The file paths look like so:
../mnt/volume_lon1_01/currency/curve/date/filename.csv
There can be many different currencies, curves and dates - Hundreds in fact - I need a means of just listing every file name at the final level of the file structure.
I thought a sensible approach would be to use wildcards:
../mnt/volume_lon1_01/ * / * / * / *.csv
But this doesn't seem to work and I can't find anything to suggest it could. Can anyone advise how would be best to list every file from SFTP in Node.js?
Many thanks,
George