Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi
I am using Creo 2.0 . I have created a mapkey, that saves the current file and deletes the old versions of the file. This is done by File>save, File>Manage File >Delete Old Versions.
Say the name of the file is "car.asm". When using the mapkey the new file will be named "car.asm.2".
Is there a way to get rid of the suffix number in the end of the filename?
Frederik
Solved! Go to Solution.
Hello Frederik Hansen
there is no simply way to remove "file version".
Personaly don´t use Creo function like you have described.
Instead of this l´m using Spurge utility. See folowing topic Re: Spekan Purge Tool
There is possibility to rename last version to no:1.
But the number of version will be always included in file name.
It´s possible to hide file extensions somwhere in Windows (it´s Windows settings --- NOT CREO settings)
Hope it can helps
Regards Milan
Hello Frederik Hansen
there is no simply way to remove "file version".
Personaly don´t use Creo function like you have described.
Instead of this l´m using Spurge utility. See folowing topic Re: Spekan Purge Tool
There is possibility to rename last version to no:1.
But the number of version will be always included in file name.
It´s possible to hide file extensions somwhere in Windows (it´s Windows settings --- NOT CREO settings)
Hope it can helps
Regards Milan
Thanks for the help, do you know with if there is way to rename last version to no. 1, without using the Spekan purge tool?
Why does rename action had to be called from within Pro/E session? For all practical reasons the file index is hidden from an end user by Pro/E's 'File Open' dialog GUI. On the other hand, the renaming of a file from the OS is a trivial matter...
Hi,
just a little explanation...
Imagine that part name is mypart.prt.123
MH
The renaming does not necessarily have to be done in Creo. Although I can see that Milan does not recommend renaming outside Creo. The reason why I want to remove the extension number is when sharing the file with others, the extension number is not of interest. Therefor I would rather get rid of it. So hiding the extension file number in my windows settings, does not quite do the work.
Hi all,
Frederik, here is what you could do : follow PTC CS151240 'Mapkey with OS Script'
and for a batch file this is command to use:
FOR /F "usebackq tokens=1-3 delims=." %i IN (`dir /b *.prt.*`) DO move %i.%j.%k %i.%j.1
FOR /F "usebackq tokens=1-3 delims=." %i IN (`dir /b *.asm.*`) DO move %i.%j.%k %i.%j.1
FOR /F "usebackq tokens=1-3 delims=." %i IN (`dir /b *.drw.*`) DO move %i.%j.%k %i.%j.1
You'll need to escape '%' character in batch file though...
HIH.
Feliks.
l´ve never thought about other way how to rename version no.
Because sPurge has batch capability and in my opinion it´s absolutly reliable software.
Don´t rename files directly in Windows! Rename in Windows = lose data.
Have you tested sPurge?
Note:
ln generall l don´t care about version no. "Has no function", if you don´t use Windchill . Only moment, when l discovered some problems with version number, was during first (basic) data import to new Windchill server (due data duplication).
Hello all,
Unless I'm totally clueless the memory dump of sPurge.exe looks like a typical 32 bit Windows operating system PE file fully dependent on OS utilities for its functioning. There is no magic to sPurge.exe, it is just a UI wrapper around core Windows filesystem functionality ( very nicely done by the way).
>dumpbin /all spurge.exe
Microsoft (R) COFF/PE Dumper Version 14.00.23824.1
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file sPurge.exe
PE signature found
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
14C machine (x86)
4 number of sections
3F584C6A time date stamp Fri Sep 5 03:42:18 2003
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
10F characteristics
Relocations stripped
Executable
Line numbers stripped
Symbols stripped
32 bit word machine
OPTIONAL HEADER VALUES
10B magic # (PE32)
6.00 linker version
32000 size of code
14B000 size of initialized data
0 size of uninitialized data
184CE entry point (004184CE)
1000 base of code
33000 base of data
400000 image base (00400000 to 0057DFFF)
1000 section alignment
1000 file alignment
4.00 operating system version
0.00 image version
4.00 subsystem version
0 Win32 version
17E000 size of image
1000 size of headers
0 checksum
2 subsystem (Windows GUI)
0 DLL characteristics
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
0 [ 0] RVA [size] of Export Directory
3DC70 [ 118] RVA [size] of Import Directory
47000 [ 136FB0] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
0 [ 0] RVA [size] of Certificates Directory
0 [ 0] RVA [size] of Base Relocation Directory
0 [ 0] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
0 [ 0] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
33000 [ 578] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory
SECTION HEADER #1
.text name
3164B virtual size
1000 virtual address (00401000 to 0043264A)
32000 size of raw data
1000 file pointer to raw data (00001000 to 00032FFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
Execute Read
RAW DATA #1
00401000: 56 8B F1 57 8B 7C 24 0C 8D 46 5C 50 68 10 04 00 V.±W.|$..F\Ph...
00401010: 00 57 E8 F2 9E 02 00 8D 8E 98 00 00 00 51 68 00 .WΦ≥.........Qh.
l´m not a programmer. Don´t know how exactly sPurge works. l´m only user of this software.