Deleting previous downloaded PDF's and reading latest downloaded pdf's

Please help me out with this scenerio…In this scenerio my bot will go to the website download the required PDF’s and extract the data from that pdf’s and it will mail the extracted text to the user…Know what i want to do is…whenever the bot will run it should delete previous downloaded pdf’s,For example:If i want to run my bot 2 times in a day…Suppose iam running 2nd time same day that is in the evening so my bot should delete morning’s pdf’s…How can i do this?

@Priyesh_Shetty1

You can get the file using

vararr= directory.Getfiles("Folderpath","*.pdf")

This eill give th pdf from the give folder path…before download do this and get the pdf files present in file and use dete file…the expression returns a array of filepaths

The second one for download you can then download and again use this to get the pdf file

Vararr(0) will give first file

Cheers

Hey @Priyesh_Shetty1 ,
Is your downloaded PDF’s are directly replicating in the downloads folder without asking you where to download it?

If yes please go to chrome and make the changes in settings
Chrome-> Settings-> Downloads-> and then enable this option

image

Then in the code initially create one folder using “Create folder” Activity and then while downloading the pdf’s Type into the same new folder address and then extract the information.
After doing all the process . Delete the entire folder(New Folder) using "Delete Folder " Activity
Like this everytime you run a bot A folder will be created and Deleted at the same run.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.