web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to check if files ...
Power Automate
Unanswered

how to check if files name contains a value or file exist

(0) ShareShare
ReportReport
Posted on by

 

Hi,

I have about 500 word file in a folder, and I want to amend some content then save as pdf format with date added in file name into another folder.

The thing is the above flow takes too long so it may be interrupted sometime.

I do not know how to continue the loop if its interrupted, so what I currently come up with is to compare the file names to skip the loop.

I have tried the following 2 method,

1. is to extract the word file names, then run the loop to see if the pdf file names contains the word file name, which does not work

2. is to extract the word file names, then use if file %current file%-date.pdf exists, which still not work

 

Please help. Thanks.

 

Screenshot 2022-12-14 122110.png

Screenshot 2022-12-14 121527.png

I have the same question (0)
  • XRQ57 Profile Picture
    206 on at

    Hi,

    if the comparison is too long, you can use powerquery to check your files and building 2 lists for PAD.

  • VJR Profile Picture
    7,635 on at

    The "If file exists" should work in this case without a loop.

    Can you make sure the correct text is compared...like spaces etc in the actual file name and in the variable you are trying to compare eg; %current file%-date.pdf

    A good way is to print the complete variable value in a Display box and then use that variable for the comparison.

     

    Also if possible share the actual file name.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard