Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

The PTC Community email address has changed to Learn more.

Automate Purge files in Windchill


Automate Purge files in Windchill

How can we automate purge files? Is there anyway to do it with OOTB


Could the next article help?

Article - "How to automate "Remove Unreferenced Files" in Windchill PDMLink":

Hi @VladimirN 


This is not the one I'm looking for, Need to remove the old iterations of the old jobs using purge management.


Currently I'm scheduling the the purge manually, I'm spending too much time in scheduling. So looking for automating it. 




@Keerthivarman Automating regularly scheduled purge is OOTB functionality.

You need to take advantage of step 4,Scheduling Options, allows you to set the frequency of the purge job.





Hi @d_graham 


Yes, I'm doing the same but prior to this we need to create a query for selecting the required folders to purge is also the thing I'm doing manually.




Do you have any idea about this




@Keerthivarman , hi


Let’s start from the beginning.

What EXACTLY are you trying to do?

Hi @d_graham 


I'll write it down here.


what are the steps I'm doing.


First I'll create a query in which I'll select the context and required old files to purge as shown below.



and next i'll go for scheduling, 

in create new job i'll select the created query and schedule the purge at the given time.



All these steps are doing manually at the year end. Is there any way to automate the whole process which I mentioned here.




Thanks in Advance



Got it.


This can be done automatically but not OOTB.

To be clear you want to automate the query creation based on the previous year's number to select all folders under Project-<previous year>

This is definitely doable and could be setup to be created annually and used by the Purge Job which would also be run annually, for example.

But again, while this is definitely doable it is also NOT OOTB.





Not all the folder but we have restricted to 1500files approx. to neglect the performance issues.


Do you have any document or article, how to achieve this?




I've written utilities to do this kind of thing for people who have requested it but I just figure it out myself how to run some java code at regular intervals (first Saturday of every month or first Saturday of every year, or whatever).

I don't know of any articles to point you. Sorry.

Please share if you find it 

@VladimirN , hi


Remove Unreferenced Files is not really a "Purge".


If you want to remove files from file vault then you use remove unreferenced files.  This has no affect on the database.

Conversely, if you want to remove from the database you use purge, which has no affect on the files in the vault.


If trying to clean up the database and the file vaults run purge followed by remove unreferenced files.

The purge will yield unreferenced files in the files vaults (assuming of course that content is stored in file vault). Any content stored as a BLOB would of course be removed from the database by the purge.





Thanks for the clarification!