Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Scenario:
Basic Creo without any PDM interface.
Issue observed:
System console > Creo Purge is removing all old creo versioned file (e.g. test.prt.2, test.prt.3) leaving the latest version for all the objects in the Working Directory.
But it is not removing old non creo version files (e.g. test.prt)
It will be really helpful if Creo purge functionality works for non creo version files too. Is there a way to make it happen?
Note:
The below options takes care of both Creo versioned and non Creo versioned files for a particular object. But we need to perform for each object individuality.
File > Manage File > Delete Old versions
Any purge utility always leaves the latest version of a file, so for versioned files it works as expected.
A cleanup utility can be used to delete non-essential files like *.m_p, *.tst, etc.
How does the utility know that 12541.prt is an old, out-dated file and delete it while leaving 12542.prt;5?
Since the PTC Purge utility is just windows batch file commands, it has no method to investigate files to see if they are used someplace and delete those that are not used. There is no way to even do this when using a PDM system.
This idea needs to be killed immediately as not practical!
If the Purge identifies two files with same file name (%%~nA), one without a Version and another with version, It is easy to instruct batch to delete the file without version. this new condition can be included along with existing functionality.
If we can write a simple utility to compare and delete, it can be easily handled by Purge utility. I guess it is possible.
You are making an assumption that 12345.prt was a prior (or possible, newer) iteration of what is now 12345.prt;7. hat may not be the case as the file names are treated differently by windows. One is a Pro/E Versioned File type and the other is Pro/E File.
Though the purge tool predates me, I believe the reason is that seeing 12345.prt, we know it had a version once, but someone stripped it off, and we can't be 100% sure whether it is older or newer than 12345.prt.4. That said, we do have a preference in Creo itself -- if there is a 12345.prt and a 12345.prt.# in the same directory, we'll load the .# one. So, if the user knows what they are doing, they could specify this by passing a (theoretical future) flag to purge, which wouldn't be hard to write. The effect would be to discard x.prt in favor of x.prt.#. The uncertainty would mean we wouldn't like to make it the *default* behavior, but as an option, it wouldn't be a problem.