Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I have hundreds of similar ProE 2001 assembly models in their own sub-folders, and each assembly uses parts that were originally copied from a generic assembly. In other words, I can grab a part from one folder and copy it to another, and when I load the assembly the copied part comes in fine.
While migrating everything to Creo, I want to update all of those parts to use new layer rules, parameters, etc., and then copy them into each of the other assembly folders. Before I do that, I want to change the version of them to something like "xxx.prt.2000", so I won't overwrite any existing "old" versions, and can easily identify them as the Creo 2 versions.
So my question is, does anyone know of a program, batch utility, etc. that will let me select a folder, and it will go through and change all of the version numbers of the .prt files to "2000" (or whatever I want)?
I could probably write a down and dirty program using VBA or something, but it's been a while and I'm getting lazy in my old age.
Hi, Craig
You can try genius-tools-purge, the program can change all part versions.
(unselect all except .prt , set 2000 to version number and push "purge")
Path to download: http://www.inneo.de/produkt/genius-tools-purge/
Regards
Leonid
Following is an ahk script that let's the user select a folder then goes into this folder and automatically renames files in the folder also going into it's subfolders such that any file named for instance file.log.2 becomes file.log.2002
FileSelectFolder, selectedFolder
Loop, Files, % selectedFolder . "\*.*", DFR
{
If RegExMatch(A_LoopFileName, "\.log\.\d$")
|| RegExMatch(A_LoopFileName, "\.prt\.\d$")
|| RegExMatch(A_LoopFileName, "\.asm\.\d$")
{
FileMove, % A_LoopFileFullPath, % A_LoopFileDir . "\"
. RegExReplace(A_LoopFileName, ".\d$", "") . "." . (A_LoopFileExt + 2000)
}
}
Use at your own risk