Bulk Editing of Footprints (and any other Files)

Some of Kicad’s parts reference .WRL, some reference .STEP (or, .STP) and sometimes the Links in the Footprints (mod files) get broken and/or a User wants to change them in a ‘Bulk-Change’ way.

There are various ways to do this - Video#1 Demonstrates using a Python Code to do it using a Programming IDE. Can use the same process on most Any File…

The DIR/Files shown in Video are attached (.ZIP). Be sure to Test before regretting not having tested it… The code uses Python’s ‘Walking’ to walk through all the Files in the Designated Path… be careful… You can Change any Text you want…

Option:
For those User’s preferring to Not Mess with Python IDE/programming…etc, you can Run the Python Code from your Systems Terminal and/or from Kicad’s Python Terminal.

Video #2 Demonstrates:
• Using system Terminal (not a Programming IDE)

• Using a Text-Editor to edit the Root-Path, Search and Replace text
(Actually, I previously changed the Path but will show the Replace text to change)

• Video shows Before and After, of the Dummy_File’s text and the Footprint Files (the last Footprint file shown (2kΩ) was ‘Not’ changed because it did not contain the Search-Text. Therefore, only all ‘exact’ text will be changed)

NOTEs:
• Text-Editor should use UTF-8 font
• Don’t mess with the Tab’'s or Spaces!! (it’s a Python thing)

Some_FP_DIR copy.zip (12.0 KB)

Video #1

Video #2