<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00009z0PLMCA2Okta Identity EngineWorkflowsAnswered2025-03-27T09:01:04.000Z2024-01-30T17:28:15.000Z2024-01-31T18:41:32.000Z

8ke9x (8ke9x) asked a question.

Are there wild cards to use with the SFTP Action file search?

Hello,

 

I am trying to search for a file on our SFTP server. It has a long hour/minute/second timestamp and I need to be able to search for just the date portion of the timestamp. I have tried to the following below and it fails. However when I give the exact file name, the SFTP finishes successfully so I know it's not a connection issue.

 

/Folder/FileHeader20240130*.csv when the actual path would be /Folder/FileHeader20240130203853.csv

 

Error when using a wildcard:

Image is not available

 

Is there anyway around this to be able to pull in this file without knowing the exact timestamp? Thanks!


  • TimL.58332 (Workflows)

    @8ke9x (8ke9x)​ 

     

    Hi Jillian, the SFTP connection doesn't support any sort of search functionality only exact paths/filenames(extension).

     

    See: https://help.okta.com/wf/en-us/content/topics/workflows/connector-reference/sftp/overview/guidancefor-sftp-connector.htm

     

    Can you possibly make an authenticated call to the directory using API Connector to "GET" a listing of the contents of the directory? If so you could do something along those lines first then build your own search criteria to pull out the specific data you want then feed it into the SFTP.

     

    IF not, this does sound like a feature request (https://ideas.okta.com). I agree it would be nice to either have search functionality OR the ability to use the same "Connection" to list directory contents so you can build out your own search functionality as needed.

     

    For example your date stamp is: (Name)YYYYMMDD(microseconds).(extension). If you have a means to list you could obtain the full file listing then of those listings then return a subset that only are the YYYYMMDD portion matches.

     

    Alternatively, if this is a single file you may want to talk to the owner of the "file creation" process. If it is a single file then the microseconds portion that causes randomness wouldn't be needed. This would leave you with a static daily filename that you would know the name of.

    Expand Post
This question is closed.
Loading
Are there wild cards to use with the SFTP Action file search?