Renaming mass amounts of files

Renaming mass amounts of files

pedcarson
Enthusiast Enthusiast
15,562 Views
17 Replies
Message 1 of 18

Renaming mass amounts of files

pedcarson
Enthusiast
Enthusiast

Hi Everyone,

 

I'm trying to copy a whole assembly over to another folder but rename part of the files. As you can see from the attached picture, I want to remove the number assigned originally to each file (67675) to 00001. It won't let me rename, only add before or after to the name.

 

I know I can rename using design assistant but for large assemblies such as this it gets tedious. Is there a way to mass copy and rename, like a replace this with that type of command for quickly renaming files like this in Inventor?Capture.PNG

 

Edit: Added Picture

0 Likes
Accepted solutions (3)
15,563 Views
17 Replies
Replies (17)
Message 2 of 18

Mark.Lancaster
Consultant
Consultant

@pedcarson

 

There's no attached picture or image...

 

I also assume you don't have Vault based on your description.  Inventor iLogic Design Copy may be a possibility but it sounds like it will not work due to your new naming convention.

 

Update:  Now that your image shows you are using iLogic Design Copy...  With that interface you can only add a prefix and/or suffix to the original file name.  You are unable to rename it to something else.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 3 of 18

pedcarson
Enthusiast
Enthusiast

Sorry just added the picture. Yes you're right I don't use Vault so I'm fairly limited.

 

Would using Vault allow this?

0 Likes
Message 4 of 18

Mark.Lancaster
Consultant
Consultant

@pedcarson

 

The paid version of Vault gives you "design copy" and would simplify this workflow dramatically.  Smiley Wink

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Message 5 of 18

pedcarson
Enthusiast
Enthusiast

Where I work we don't have Vault set up. We are on a paid subscription with Inventor but not sure about Vault.

 

If I rename files with a third party application after copying them over will they lose all ties to the assembly?

0 Likes
Message 6 of 18

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi pedcarson,

 

First, please visit this link and give this idea vote (kudo):

http://forums.autodesk.com/t5/inventor-ideas/string-replace-for-ilogic-design-copy/idi-p/3821399

 

Secondly, I think your best bet since you don't have Vault, is to use the Design Assistant. It's clunky and slow, but it will allow you to rename without breaking links:

https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/sfdcarticles/sfdcartic...

https://knowledge.autodesk.com/support/inventor-products/learn-explore/caas/CloudHelp/cloudhelp/2017...

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 7 of 18

MechMachineMan
Advisor
Advisor
Accepted solution

Someone had once posted an Excel Spreadsheet that was loaded with macros that renames assemblies/components, so you could try finding that!

https://forums.autodesk.com/t5/inventor-customization/batch-renaming-program/td-p/6298702

It's there, I guess it just has some issues that need sorting out.

 

I also have my own version, so it's definitely possible to get it fixed and working well.

 

Not too long ago, there was also the discussion for the code for a different variation. 

(https://forums.autodesk.com/t5/inventor-customization/rule-ilogic-o-vba-in-inventor-2015-to-subtitut...)

 

So with some coding experience/help from a willing person experience in programming you could use those 2 links to make a beautifully working excel spreadsheet.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 8 of 18

mflayler
Advisor
Advisor

Free Vault also offers that functionality and if you own Inventor you already have free Vault.  You just need to understand and implement it.  Its a server/client interaction so you have one piece on a server and your client will talk to it to perform Vault actions including Copy Design, Rename, Replace, essentially what Design Assistant really evolved into since DA hasn't been upgraded for over a decade.

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

Mark Flayler - Engagement Engineer

IMAGINiT Manufacturing Solutions Blog: https://resources.imaginit.com/manufacturing-solutions-blog

0 Likes
Message 9 of 18

MechMachineMan
Advisor
Advisor
Accepted solution

I'm feeling generous today, and I made the quick tweak that I needed to to make it slightly more fool proof.

 

Attached is my batch renamer. Any questions on it's operation, feel free to ask.

 

Might want to play around with some test copies first too, although it does create a brand new set of files anyways.

 

 

* Only use the buttons, the three fields up top of file locations, the Skip field on the second page (to skip CC files), and the Part Number field.

Whatever you put in the part number field is what the file gets renamed to, in the target dir.

 

Only files listed on the excel sheet get renamed, so delete anything you don't want renamed.

Also note that all instances of files in the list have their old version replaced with the new version for every file in the list.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 10 of 18

mslosar
Advisor
Advisor

You can use windows powershell to rename the files as well. This is basically a manual method though you can do all the files at once with it.

 

After the rename, you have to open your assemblies and they'll fail to find what they were looking for (looking for the old name) and you can point them at the new name. If you're under a 100 files, it's do-able, but if you've got a 1000 part assembly it'll take forever.

 

It's not the ideal way, but without vault there's not much else that can be done that i'm aware of....oh, and it'll need to be vault2016 as well (possibly 2015R2) as prior to that, i don't think the mass rename option was really available.

0 Likes
Message 11 of 18

Anonymous
Not applicable

I was surprised by using BatchRenameFiles Tool.
Search google  BatchRenameFiles Tool

0 Likes
Message 12 of 18

Anonymous
Not applicable

Rename Folder with BatchRenameFiles Tool is very easy You can find this by google search - BatchRenameFiles Tool

0 Likes
Message 13 of 18

mflayler
Advisor
Advisor

How does that fix the problem of re-linking the files internally.  It doesn't.  Use Design Assistant or Vault, or even Copy Components in an Assembly.

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

Mark Flayler - Engagement Engineer

IMAGINiT Manufacturing Solutions Blog: https://resources.imaginit.com/manufacturing-solutions-blog

0 Likes
Message 14 of 18

Anonymous
Not applicable

Hi, I've tryed your excel sheet. At first view, it as exaclty what I need for a batch renaming purpose. But I can't make it work, all links to macro seems not included in the speadsheet? (yes, macros are all enabled). Manually input the files path for all files or trying with the buttons leads me to "impossible to execute marco"

Any idea what I'm missing here?

0 Likes
Message 15 of 18

ralfmja
Advocate
Advocate

Hello,

 

I think your solution is what I am looking for.

 

Unfortunately, when downloading the Rename Macro v1.zip file, I have an error because the links do not work.

 

Can you send this file again so that I can check if this tool will be useful to me 🙂 ??

 

Below you can see what error I have when I click the select project button

obraz.png

 

 

 

Thanks in advance,

Best regards,

ralfmj

0 Likes
Message 16 of 18

MechMachineMan
Advisor
Advisor

hi @ralfmja 

 

I believe it should be good to go. You might have to hit "Clear Sheet" to get rid of the current lines I have there and then it should work.

 

Also, please review the other tabs in the file (if they exist, I can't recall) and verify that the typed in links work for the file you want and your server set up.

 

As it appears in your photo, you still need to change the PROJECT, ASSEMBLY, and TARGET FOLDER fields to match what you are trying to accomplish.


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
Message 17 of 18

ralfmja
Advocate
Advocate

@MechMachineMan,

 

 

OK - I mastered it. Works perfectly for me.

 

 

I see only one serious problem, which is copying linked drawing.

 

 

Is it possible to add drawing copying tools to this ??

 

 

Thanks for your time,

 

Cheers,

 

ralfmj

 

 

 

 

0 Likes
Message 18 of 18

inventor4578
Advocate
Advocate
Hi ! Thank you very much for the macro. Is it possible to ad fonctionnality for not copy unnecessary files into the assembly? Thank you again
0 Likes