How do I add a wildcard to a string ...?

hello, community.

The workflow is to download a file.

I’m getting an error when I try to add a wildcard or asterisk ( * ) to this activity in the “Remote path” feature ( String value)

image

I’m trying to put a wildcard after “16” because after that the numbers are variable ( highlighted with red … look at this, please.

I dont know how to do that .
Any idea, please. Thanks.

Hi @pprin070

In Remote Path Field give the path by below

"/bcsuser/riskapp/achieve/20230807_16*"

Just remove slash before wildcard no need to give slash.

Hope it helps!!

Hello @mkankatala .

I’m getting this error after removing the slash.
image

image

I checked it on the SFTP server and the file exists but It doesn’t get it.

image

help, please.

In the Paths we use the backward slashes but you have used the forward slash. I think it was a possibility to get this error.

Check the path is correct or not. @pprin070

@mkankatala .

I changed to backslash but I got the same error.
image

image

It looks like It’s looking for the file with the * included and It’s not doing the logic to realize if the variable format changes.

Help, please

We have given the wildcards properly that was not an issue. The path is not valid copy the file path from the folder directly then try. @pprin070

Try to give the whole name of the file without wildcards, then see is it working or not. If we are getting the same error then the path is wrong.

@mkankatala
I put the file path with forward slash as I get it from the SFTP server and It works because It downloaded.

image

What could It be the mistake, please?

Hello @pprin070 ,
Could you just try by giving 4 ‘?’ instead of * in the Remote Path:
“/bcsuser/riskapp/achieve/20230807_16???”
And check if it Works?

@pprin070

CurrentFile will be your download file path.

Cheers!

Wildcards support is depending on the implementation of the used FTP Server

When wildcard is not supported, we would

  • collect the information with Enumerate Objects
  • post processing the information e.g. filtering with LINQ and can implement concepts like wildcarding names

Hello, It didn’t work.

I assume you can’t use wildcards in a path/filename because it could match multiple paths/filenames.

As @ppr mentioned, you need to get all the folders and loop through them, checking each one to see if it’s what you want and then processing it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.