Team, I am fighting with the SFTP module, where I ...
# suitescript
a
Team, I am fighting with the SFTP module, where I do a connection.list operation. I used to pass on the first parameter a wildcard string to filter the list of files returned, for example “/folder/*.xml”. It seems this no longer works. Do you if this has changed recently? Slack Conversation
z
The first parameter is a path. If the host accepts wildcards, then perhaps you were unwittingly benefiting from functionality of the server, not the API. You actually have something better at your disposal: Array.prototype.filter, as Connection.list returns an Array of objects. So, for example:
Copy code
conn.list({...}).filter(it => it.name.match(/^FooBa[rz].+\.pdf/i))
a
oh, okay, thanks
works great!!! thank you soo much!!!
😀 1