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 / how to pick image rand...
Power Automate
Answered

how to pick image randomly from local storage PAD?

(0) ShareShare
ReportReport
Posted on by 357

Hi Team,

I want to pick the any one image randomly from the local storage.

how i achieve this in PAD.

 

 

Thanks in advance!!!

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    Hi @Sanket1 

     

    I would propose the below flow for the same:

     

    1. Initially, retrieve image files from the designated folder.

    2. Determine the total number of files, then employ a random number generation step with a range specified from zero to the total file count.

    3. Utilize the randomly generated number as an index to select an image from the folder.

     

    Deenuji_0-1716213260678.png

     

    Code:

     

    Folder.GetFiles Folder: $'''C:\\Users\\azureadmin\\Pictures\\Screenshots''' FileFilter: $'''*png''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    Variables.GenerateRandomNumber.RandomNumber MinimumValue: 0 MaximumValue: Files.Count RandomNumber=> RandomNumber
    Display.ShowMessageDialog.ShowMessage Title: $'''Info''' Message: $'''Random Image: %Files[RandomNumber]%''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard