There are several ways to do what you want.
Some things to know:
• DIRectory = Folder
• By Default, all of your Footprint files are in the same Parent (top-Level) ‘footprints’ Directory
• Those files Tier-Down to specific footprint Folders and Files
• You can Change the Content of these files individually or, in Bulk
• Any Content is valid for changing, so be careful!
For only a small number of files, it would be easier to do Individually and the easiest way is by using a Text-Editor (they all have Search and Replace)
For doing it in a Bulk way (meaning, changing many files) there are some Choices, most useful being to use Code to do it.
Code, typically Python, can Walk through an entire Directory and change all files, thus, Use Caution!
To help ensure changing only what you want, it is helpful to include text from a String that is specific to the files and content (Footprints), thus avoiding unwanted changes.
This Demo Video shows using a Directory specific for this Demo But, most likely you’d want to do it on the Top-Level ‘footprints’ folder/Directory.
In my system, the Footprint file (called ‘.mod’ contains the Model, xyx positions at/near the bottom of the file.
The Video shows:
• Changing the root-path (you’ll want your path)
• The Text to search for to replace (R_1kΩ.step)
• The Replacement text (COFFEE)
Video shows verifying that Only the intended text was replaced (the Files in the Dir), nothing else was changed. I did Not change x,y,z positions or rotation angle… Could have done that just as easily.
Pay attention to what’s done in the Video.
Attached is the Python Code that should run on your system’s default Python. You can also run the Code from the Command-Line tool in Kicad’s PCB (need to learn how, Not shown in video)
The Code
GOLD_File_Contents_Search_Replace.py (1.4 KB)
Screenshot of the Files for the Video