Skip to main content
3-Newcomer
June 26, 2014
Solved

purge old versions in creo in a base directory and all of its sub folders

  • June 26, 2014
  • 4 replies
  • 11963 views

I currently have a right click context menu set up for the creo purge command. it works but i have 1400 folders to go through.

is there any way to purge old versions for creo in a base directory and all of its sub folders by running the purge command once?


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by FPerez

HELLO,

For a recursive purge you can use the script below :(change the foders settings)

Else i know that there are freewares on internet to do this.

@echo off

REM set to location of this script

set scriptname=C:\cao\temp\purge_all.bat

REM set to pro/engineer loadpoint

set prodir="C:\CAO\appli\Creo 2.0\Parametric"

if "%1" == "purge" goto p2

cls

call %prodir%\bin\purge.bat

echo.

FOR /D /R %%a IN (*.*) DO call %scriptname% purge "%%a"

:p2

cd %2

echo Purging %2.

echo.

call %prodir%\bin\purge.bat

4 replies

1-Visitor
June 26, 2014

I use a free utility that works well, but is not very intuitive to use. It was written by a German guy/gal(?) and the interface is awkward. But it does purge old versions recursively (into sub folders) and it cleans out files like .logs and .inf and .m_p, etc...

proe dot cad dot de/downloads/DrPurge.html

I am sure there are others - maybe someone will post a better solution for us both!

-Nate

1-Visitor
June 26, 2014

why am I being moderated today?

1-Visitor
June 26, 2014

"This reply has been hidden. This can happen if the message has been hidden by a moderator, or has been reported as abusive."

?

1-Visitor
June 26, 2014

Here is a cleanup batch file. It will only do one folder at a time though. You put it in your folder and double click on it. I don't know how to edit such a file, but this is what it looks like in Notepad. Maybe there's way to edit it so that it can search in subfolders as well?

del *.ICON

del *.rpt

del *.alias2iges

del *.iges2alias

del *.step2alias

del *.alias2step

del *.m_p

del *.bom.*

del *.ger

del *.inf

del *.inf.*

del *.log.*

del *.lst

del *.lst.*

del *.memb

del *.ptd

del *.rel

del *.tst

del *.err

del *.ICON

Del *.LOG

Del *.idx

Del *.xml

purge.bat

1-Visitor
June 26, 2014

I use a free utility that works well, but is not very intuitive to use. It was written by a German guy/gal(?) and the interface is awkward. But it does purge old versions recursively (into sub folders) and it cleans out files like .logs and .inf and .m_p, etc...

proe.cad.de/downloads/DrPurge.html

I am sure there are others - maybe someone will post a better solution for us both!

-Nate

Sorry for the double post - for some reason I am being "moderated" today.

FPerez13-AquamarineAnswer
13-Aquamarine
June 26, 2014

HELLO,

For a recursive purge you can use the script below :(change the foders settings)

Else i know that there are freewares on internet to do this.

@echo off

REM set to location of this script

set scriptname=C:\cao\temp\purge_all.bat

REM set to pro/engineer loadpoint

set prodir="C:\CAO\appli\Creo 2.0\Parametric"

if "%1" == "purge" goto p2

cls

call %prodir%\bin\purge.bat

echo.

FOR /D /R %%a IN (*.*) DO call %scriptname% purge "%%a"

:p2

cd %2

echo Purging %2.

echo.

call %prodir%\bin\purge.bat

3-Newcomer
June 27, 2014

just to clarify, could i create this as a batch file and/or run it from a right click context menu outside of creo?

13-Aquamarine
June 30, 2014

ROBERT HOPKINS wrote:

just to clarify, could i create this as a batch file and/or run it from a right click context menu outside of creo?

Yes, this works fine exactly as you say.

I've actually had it set up as a right-click menu option on a folder in Windows, so you can right-click a folder and just purge it from there.

We had that version purging just the single folder, with another batch file which we ran from the command line to do a recursive purge - reduces the risk of an accidental click purging the whole drive!

1-Visitor
June 26, 2014

there is a free utility that I use - probably constructed with similar code as is shown above. The utility is written by a German individual and its interface and usibility is not the greatess - prett hard to figure out. But it wirks well and I use it regularly. It is called "Dr. Purge" and I think posting a URL get's my reply "moderated" and does not post. A google search for "dr purge" returns several direct references to this utility.

I used to use "SpekanPurge" which worked well, but lost the link to it and found Dr Purge...

Anyone use other utilities that work well?

-Nate

14-Alexandrite
June 27, 2014

on Olaf Corten's site he has a purge tool, it is similar to what I already made myself, so I don't use it. But it appears to have a purge sub directories right-click.