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 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 2025 Season 2 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

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard