I don't know of any program that can be run from within Creo to do this, but I have a DOS batch file that does. It uses the program that is supplied with Creo, called "purge.exe". For me, it's located in "C:\Program Files\PTC\Creo 2.0\Common Files\M160\x86e_win64\obj".
The batch file I made traverses the directory structure and "purges" each directory, which deletes all earlier versions of the file types associated with Creo, like *.asm.*, *.prt.*, etc. I've also, as you'll see, added other deletions, like getting rid of .m_p files and other temporary files Creo seems to like to create. Since .bat files can't be downloaded by a lot of users, here is the text of the file:
--- [ Begin recpurge.bat ] ---
::
:: Date * 30 August 2015
:: Author * Kenneth J. Farley
::
:: Recursively traverses the directory structure, starting at the current
:: directory, and executes a purge and any other commands necessary. The
:: pseudocode for this is as follows
::
:: (1) Generate a list of directories
:: (2) For each of the directories
:: a. change to that directory, via a "pushd"
:: b. Execute the desired commands
:: c. change back to the original directory, via "popd"
::
@echo off
for /r /d %%d in ("*") do call :doPurge "%%d"
exit /b
::
:: This code is executed for each directory visited. The primary purpose is to
:: run the "purge" command, but it's also helpful to get rid of any other stray
:: files that Pro/E creates in the normal course of operation.
::
:: Note: The "2> nul" construct is used to throw away any "file not found" type
:: errors generated when the delete command doesn't find the target files
:: provided to it.
::
:doPurge
pushd %1
echo Processing %1
c:\ptc\purge
::
:: Windows generated files
::
del /ah Thumbs.db 2> nul
::
:: PTC General files
::
del APS00W07 2> nul
del current_session.pro 2> nul
del datafile.ers 2> nul
del errors.lst.* 2> nul
del fix_params.log 2> nul
del *.acc 2> nul
del *.crc 2> nul
del *.err.* 2> nul
del *.idx 2> nul
del *.inf.* 2> nul
del *.log.* 2> nul
del std.err 2> nul
del std.out 2> nul
del trail.txt.* 2> nul
del *.xpr 2> nul
del *.tst 2> nul
::
:: PTC Manufacturing files
::
del *.acl 2> nul
del *.lst 2> nul
del *.mbx 2> nul
del *.ncl.* 2> nul
del *.ncl_a.tab 2> nul
del *.ncl_b.tab 2> nul
del *.ncl_c.tab 2> nul
del *.ncl_x.tab 2> nul
del *.ncl_y.tab 2> nul
del *.ncl_z.tab 2> nul
del *.tap 2> nul
popd
exit /b
--- [ End recpurge.bat ] ---
Modify the program to look in the proper directory for the "purge.exe", add or delete other files to "clean up", etc.
As usual, I'm not responsible for any troubles you encounter in using this technique. As with any such utility, you will want to test it out on a small directory first before unleashing it on a large directory structure.
Also, I always run this in a "Command Prompt" window, don't know if it works well any other way.