How to check if the exist file in a folder if exist delete create new in a loop with diff name

Let me explain the situation, Ex. suppose I have 10 pdf files and I need to extract the 10 pdf data in diff - 2 text file. But I want to create 10 diff files which contain 10 diff pdf data. But I need to check if the pdf one data is already in a file delete it and create it new like this 10 file.

Use the path exists activity and in an if statement delete the file and create a new one.

@alin.ferenczi Only this much that I already know