PDM task to remove old PDF

We currently have a PDM task that creates PDF files in a network location (not inside PDM vault). When the PDM task is run, the PDF files are saved with a revision letter in the file name (for example: 514447_C.pdf). In the folder that the new PDF file is saved, there may be an old revision of the file (for example: 514447_B.pdf).

Does anyone know of a way to remove the old version of the PDF from the network location automatically? I am hoping that this can be accomplished with the PDM task (or action in the PDM transition).

One option may be to use a .cmd file that deletes the file from argument list. Then run that as a transition action.

Problem I can think of is getting the file name of the pdf to delete, I think you would need to do some string manipulation in the cmd file to get the pdf name for previous revision.

Are you using the Solidworks Task Add-in or some other PDF task?

bnemec, we are using the standard Task Addin for converting a file to PDF. We don’t have any special script running it either.

artem, I saw you on our forum today. Do you have any suggestions for my issue?