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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Deal with downloaded f...
Power Automate
Answered

Deal with downloaded files with random postfix

(0) ShareShare
ReportReport
Posted on by

Hello everyone,

 

In my process I will download a file from website such as Google Ads Billing and it will then export a zip file.  This filename will have "export-" prefix and random postfix.  Same file name pattern will also be applied when exporting Power Automate Flow.

 

Because the name contains random text, I have no way to target the file and open the file.  Is there a way to open this file?  Is there any functions which will allow me to open files with file name starting with "export-"?

 

Thank you.

 

Best regards,

David

I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at

    Dear DavidLee,

    If you know the application which could open the file, I would rename the file with the correct post-fix and then open the file. If not, then I would let PAD rotate between the known/common post-fix and try open the file until you get lucky ... This should at least reduce the number of 'unknown' post-fix files.

     

    Hope the suggestion helps, if so, please indicate in the thread.

    Happy flowing,

    Koen 

  • DavidLee Profile Picture
    on at

    Hello Koen,

     

    Thank you for replying.

     

    Well, because invoice file names downloaded from Google Ads are with random post-fix, post-fix would not be known or common...

     

    Just wondering if opening a file must have fixed file names?  Could I list the files with fixed file names and then open those files using a loop?  Thank you.

     

    Best regards,

    David

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I think that’s what @Koen5 @Was saying. 

    get files

    For each file in %Files%
        Change extension

    End (Loop)

     

    now they are all the right extension and you should be able to open them. 

    So, this would work if they are all meant to be opened with one program, example:  they all come down in csv, txt, xls, xlsx, etc, and they can all be opened in Excel. 

    if that’s not the case and they are various different programs, like docx, xlsx, and pdf, then I would:

    Get files

    %For each %CurrentItem% in %Files%
        Switch %File.Extension%
            Case doc

                 Open with word

            Case xls

                  Open with excel

             Case csv

                   Open with Excel

                   Save as xlsx

    End (Switch)

     

    so you can define all the further actions taken under each case. You might need to spend a few rounds teaching it, but eventually, if you have a case for each post, then you will have what you need. 

    good luck. 

            

  • VJR Profile Picture
    7,635 on at

    @DavidLee I suppose you are saying that you have files downloaded with "export-" as prefix and anything else after that. Like:

    export-1234

    export-5678

    And if you want to know which file to open that was recently downloaded you can use the approach of getting the most recent one by sorting it based on the date/time which can be done using Get Files action.

     

     

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Potentially another option:

     

    ryule_0-1661874856389.png

     

     

    Check this box in your Chrome settings, so you can define where it saves

  • Verified answer
    KaranSomnathe Profile Picture
    46 on at

    Hi @DavidLee ,

     

    You can try, get files in folder with filter as last modified and open index 0th file.

     

    Regards,

    Karan

  • DavidLee Profile Picture
    on at

    Hello Karan,

     

    Yes, this is what I end up doing as my solution.

     

    My next problem is the excel file extracted from the zip file.  Last modified date is the actual file last modified date, not the date when extracting...

     

    But thanks anyway!

  • KaranSomnathe Profile Picture
    46 on at

    Hi @DavidLee ,

     

    For this, you can take the reference of the current date time variable and do comparison.

     

    Let me know if this will work for you.

     

    Regards,

    Karan

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 412

#2
Vish WR Profile Picture

Vish WR 305

#3
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

Last 30 days Overall leaderboard