Check if a file with certain content exist in directory and it's subdirectory

Trying to find if a file exists in a directory and its subdirectory which has some specific content.
For eg: I am trying to find if there is file which has “helloworld” written inside it. There can be 100’s of files in the folder and subfolders. All the files will be .docx files

How can I do it through UIPath?

Hi,

Do you use StudioX? The following sample might help you. Can you try this?

Output
image

NewBlankTask12 (2).zip (68.8 KB)

Regards,

1 Like

Thank you @Yoichi for the quick reply. I am using Studio Pro. Can I still do it there?

Hi,

The above sample also work in Studio. However, if we write it for Studio, it will be like the following.

Sample20220907-2.zip (21.5 KB)

Note : It might be necessary to open dummy word file in advance If you have problem regarding COM exception from word.

Regards,

1 Like

Thank you so much @Yoichi . This worked like a charm!

1 Like

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