Please help me in this usecase
We have multiple folders which contains two pdfs(one old, one new)…we have to pick one folder , compare the 2 pdfs using (Compare PDF & Word Documents Online - Draftable)…once done we have to save the result and pick another folder and compare the pdfs inside it…so on
please guide me
Hy @kshenam, welcome to the UiPath Community!
To achieve what you want:
- Create an Array of Strings variable to loop through all folders inside your folders parameters
- Loop through the files inside each folder
- run the comparison
- Record the result
I will prepare an workflow and uploaded it to you
Welcome to the community forum
As I understand it you are having one master directory, with several subdirectories containing the pdf files right?
- Master directory
- Sub directory 1
- Sub directory 2
- Sub directory 3
and you wish to compare these using your website there.
Here is how I would do it.
- Get a list with all the sub directories
- For each Sub directory, get a list of the items in the sub directory
- Read the name of the pdf file and determine which is old and which new
- Click on the website ‘choose file’ and upload the old pdf file to the website using the file path
- Click on the website ‘choose file’ and upload the new pdf file to the website using the file path
To get the following list I would use the following syntax:
listOfSubDirectories = Directory.GetDirectories("Path of the master directory")
For Each dirFile In listOfSubDirectories
subOutput = Directory.GetFiles(dirFile)
For Each pdfFile In listOfSubDirectories
if pdfFile.Contains("Old") then
workflow to click 'choose file' in the 'old' option and type pdfFile into file path
workflow to click 'choose file' in the 'new' option and type pdfFile into file path
step 2 also includes the sytax for step 3
I hope this helps you in the right direction
Please have a look at my workflow.
As I saw, this site just opens 2 pdfs side y side, it does not compare the pdfs itselft.
Have a look
ComparePDFs_Test.zip (409.7 KB)
Dear William , Thanks
…We could not able to read files inside sub folder!
Take a look at this file, it is a bit different than the previous one, it has nothing to do with the website
LoopThroughFoldersAndFiles.zip (357.3 KB)
Dear , You are really awesome and many thanks
now my use case changed …
1.Open foxit pdf
2.Click on View->Compare
3.One dialogue button will appear …chose old file by clicking on button…then chose new file by clicking on button…
4.click on compare button and save it
5.Next go to other files on another folders and save the comparison
pls suggest workflow
Very glad I could help you. Please like my post and mark my answer as a solution!
In the case of comparing the pdfs I believe there is no automation to be made, as there comparison must be made yourself.
PS: Please TAG me in your answer so I get notified.
Thank you very much for the like for the like, but you forgot to mark my post a solution
I am in middle of a project wherein I have a huge stock of pdfs in a folder and i need to count the number of pages in it, and how many pages are blank and Also after the above request is done this needs to be written in an excel wirh column, 1.file name(pdf name), 2. Number of pages in the pdf, 3. Number of blank pages in a pdf
Really appreciate ur help. I’m also facing a similar problem, requiring to open files from multiple sub folder. I have seen ur workflow but I do not really understand (I have no IT background and just started). Is it possible for u to do a tutorial for me please .