Delete all pdf in folder

Hi

I have a folder , in that folder there are excels ans pdf
I want to delete all pdf from that folder …

Robot should 1st check if pdf is theere or no. Any named pdf .If yes then delete all… of not then log msg no pdf found .

May I get workflow picture ? With condition …How to check if any pdf is there or no…How to delete without knowing name …

Pls help.i m new developer

Create a array of strings variable as array_pdfFiles

Use an assign activity
array_pdfFiles = Directory.getfiles(“folder path”, “*pdf”)

Take for each loop activity and drag if activity into it with the following condition:
Array_pdfFiles.length > 0
delete files activity into it

Put the logs that are required for your business case

In delete file what path to.mention
We need to give full name there
Data\Output\123.pdf

I don’t know names of files and need to delete all with extension pdf
@Anjani_Kapoor

TIA

Hi,

Please check the attached xaml.
DeletePDFs.xaml (8.6 KB)

1 Like

Hi @Shruthika_r

Please find below workflow

Workflow.zip (1.8 KB)

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