Batch Re-Name???

I have a bunch of part numbers that are
5055-01-1111 etc
I want to change them to
T-Rex-01-1111 etc
any macro out there that will do this and keep all the links to the
assemblies and drawings?
I can do it in SW Explorer but this will take forever.
Ben
Reply to
Ben
Loading thread data ...
Don't know about macros but I have a T-Rex Screen Saver that shows a three-wheeled high performance motorcyle made in Canada.
Same company?
Len
Reply to
lmar
I wish..... Nope not the project I am working on, but would love to have one of those bad boys (god is that a sexy vehicle or what!) and / or work for the guys. I am in Canada too so if any T-Rex guys need some help, I can make your product better via my talents in structural design, tons of aircraft experience and aerodynamics.
And now for the selfless plug for my new consulting company
Ben snipped-for-privacy@mountain-wave.ca
formatting link
403.831.0195
Reply to
Ben
Ben, You can always do it the old school way using DOS command REN for RENAME.
First open a command prompt window; Start/All Programs/Accessories/Command Prompt
Navigate to the folder that has all the 5055-01-1111 files in it using the Change Directory command CD:
translation; rename all files begining with 5055- to T-Rex- example: 5055-01-1111 --> T-Rex-01-1111 5055-01-1112 --> T-Rex-01-1112
The biggest pain is getting to the files directory. I Actually can right click on a folder and select command prompt and it opens DOS Command Shell right in the specific folder. But in order to do this I had an email that instructed you on how to add the function to the righrt click. I will look for it.
Command syntax help files for DOS commands. Open a command prompt window and type
or
or help rename
C:\Documents and Settings\GReilly.ZOLLMED>help rename Renames a file or files.
RENAME [drive:][path]filename1 filename2. REN [drive:][path]filename1 filename2.
Note that you cannot specify a new drive or path for your destination file.
~George
Reply to
George
Hi Ben,
I'm not sure what OS you have but if it's XP:
1) Swipe all the files in explorer (or alt select to get a group) that you want to rename
2) Hit F2 (or RMB rename - F2 works for me)
3) Change the first filename to look like what you want (change in middle end or beginning).
4) Hit your mouse in the whitespace (unselect them)
Voila! All of them are now renamed to the pattern defined in the first file.
I found this little gem by accident one day.
Later,
SMA
PS. If you need to do any hardcore remanipulation or filenames - (not straight-forward renames like above) I recommend a program called Take Command.
Reply to
Sean-Michael Adams
Oops - didn't really read your post too well . . .
This is a damned nice trick anyways that we all need sometimes - I missed your associativity need . . .
You know - Explorer vs Explorer - I thought you meant Explorer, not Explorer . . .
:)
Reply to
Sean-Michael Adams
Actually that might work ok in conjunciton with the solidworks open dialog.
Open SolidWorks File>Open Select a file with references and hit the references button. In the References dialog hit the select all button and then hit the replace button Replace 5055 with T-Rex Open the file and save. Repeat.
Reply to
CS
Simply awsome! this is the trick
First I used Rename to change the names in the folder (i.e. in this case 5055 to t-rex) you can get rename at
formatting link
Actually that might work ok in conjunciton with the solidworks open
Reply to
Ben Eadie
Do any of these techniques restore the associativity between a part and a part drawing? Or is that restored when opening part drawing and finding the missing part file?
Thanks for this discussion on renaming tricks. I've learned a bunch
Thanks, Blair
Reply to
Blair Sutton
Do any of these techniques restore the associativity between a part and a part drawing? Or is that restored when opening part drawing and finding the missing part file?
Thanks for this discussion on renaming tricks. I've learned a bunch
Thanks, Blair
Reply to
Blair Sutton
Drawings stay associated if they are the same name at the part or assembly (the way I do things) i.e. 5055-01-0001.sldprt ---> 5055-01-0001.slddrw
Actually...now that I think of it, the part where you open the top level assembly and change the association names should keep the link, I will have to give that a go later and test it.
Ben
Reply to
Ben Eadie

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.