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 Automate
Unanswered

Get files from folder

(0) ShareShare
ReportReport
Posted on by 90

Hi,

I am new to PAD. I am trying to get all the pdf files from the folder and by using "read text from file " action i am trying to extract the data's from the file. my folder contains nearly 100 pdf files. please help me how to achieve this. Thanks in advance.

 

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @DN1 ,

     

    Please find the attached solution. I am writing to Text file as example you can write to excel or wherever you want.

     

    VishnuReddy1997_0-1711691152258.png

     

    Folder.GetFiles Folder: $'''C:\\Users\\OneDrive\\Desktop\\Required Documents''' FileFilter: $'''*pdf''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
    LOOP FOREACH CurrentItem IN Files
    Pdf.ExtractTextFromPDF.ExtractText PDFFile: CurrentItem.FullName DetectLayout: False ExtractedText=> ExtractedPDFText
    File.WriteText File: $'''C:\\Users\\OneDrive\\Desktop\\Extracted_Output.txt''' TextToWrite: ExtractedPDFText AppendNewLine: True IfFileExists: File.IfFileExists.Overwrite Encoding: File.FileEncoding.Unicode
    END

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Read text from file works with text files only. In order to extract the data from a PDF document, you need to use Extract text from PDF. This is assuming your PDF documents are electronically generated and not scanned. If they're scanned, you will need to use OCR instead.

     

    So, the correct approach is to use Get files in folder to retrieve the files, then use a loop, such as a For each loop on the outputs of the Get files in folder. When you do that, you get a %CurrentItem% which will store the one file for the current iteration. And you can use that in Extract text from PDF.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard