Path with wildcards

I want to check if a path exists. The path is :“Data\Output\diplomas"+diploma+”*.Mind.en.p12".
diploma is a string, i have used wildcard because i will not know what willl be in between diploma and .Mind.en.p12.
But this method doesnt work, where is the problem?

try this (pseudo code, convert to UiPath activities):

myPaths = string[] (=array of String)

Assign: myPaths = directory.getFiles(“Data\Output\diplomas” + diploma + ”*.Mind.en.p12")
if myPaths.length > 0 then pathExists = true

but i have tried path exist because later i will use this path to download the file if it doesnt exist

Here you have the path as well, since the value(s) of the array contain the path as well…

it shows an error of type:Assign: Illegal characters in path.

That will most likely be caused by the value of your ‘diploma’ variable.

Or, if you literally copied my code, replace all the double quotes. This forum tend to replace those with other characters (the more diagonal ones). Type it over manually.

i replaced but same
the value is a number for ex 01230232

Share a sample or screenshot of your code please.

actually i have to get all the files that are inside a folder in drive but with find files and folders i can get only one file.
is there any option to retrive all the files’id that are inside the folder in drive ?

Hello @bestRobot

Are you trying to get all the file details in a folder? Is that the requirement? If yes, you can do as below.

Directory.GetFiles(“FolderPath”)

yes but how can i get the path in drive?