Home Forums UiPath extract specific files from directory using uipath

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #2871

    How I can extract files with specific extension let say .pdf from a directory and display there names?


    In order to get files with specific extension from a path, you need to use the .Net method : directory.GetFiles(FullPath as a string,SearchPattern as a string)

    in our case:

    directory.GetFiles(FullPath as a string,“*.pdf”)

    to get the files with pdf extension.

    will first use assign activity to assign the method to an Array of strings that will hold the values of paths in the directory.

    After that step, we will use for each activity to loop on the files inside the array.


    the items in the array will return the full paths of the files as string. Thus, you will need to use string manipulation to get the file name only which will be:


Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.