Directory.GetFiles(YourFilePath) returns null

I want to read the file names in a directory and if a particular file exist then I do my next activities.

But I’m having issue at the first step itself. Directory.GetFiles(YourFilePath) is returning null value.
See the images below. Please let me know where am I going wrong.



As you giving a string array variable

Try with filename(0).ToString to get the first value


Use Foreach to get the values

Hope this helps you


Yes, right. I wasn’t logging the message right. Thanks for the quick reply.

I can use the same assign activity to get a particular file as well right?
example: Directory.GetFiles(clientsPath,filenamestring+"*")

1 Like

Yes u can also use it in for each for iterating those files in folder

1 Like

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