Solved

Bot not picking the files in the order they saved

  • 29 May 2023
  • 1 reply
  • 26 views

Badge +4

I am processing Scanned PDFs having multiple pages, first using PDF - Extract Image I have extracted images and they are saved into folder. Filenames are in the order  Invoice_1, Invoice_2, …..Invoice10, Invoice11 so on.

Now using loop for each file in folder I am extracting text for that images and saving the extracted text into txt file with file name as InvoiceTxt_1, InvoiceTxt_2 and so on. 

But bot is not picking the Image files in the order  nvoice_1, Invoice_2, …..Invoice10, Invoice11 so on. Instead it is picking files in the order  Invoice_1, Invoice_10,   Invoice_11, …...Invoice_2 so on.

 

Is there any solution for this ?

icon

Best answer by Zaid Chougle 30 May 2023, 11:15

View original

1 reply

Userlevel 4
Badge +10

Hi @Harika 1170 ,

As you are using loop to extract text from an image, you can name the txt file with image name along with extension  as .txt.

For example Invoice_10 is opening first to extract text, and as the name is coming via variable of loop Each File in Folder, you can name the text as $File{name}text$.txt

This will eliminate the need to track the file name for text

Let me know if above solution works or not.

Reply