Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
rename KiCad gerbers to remove the layer names from filenames, just extension
:: Rename Gerbers from "random-crap.ext" to "project-name.ext"
:: This also means you shouldn't have two files with the same extension.
:: 2019.09.24 darell tan
@echo off
setlocal EnableDelayedExpansion
set /p proj=Project Name?
for %%f in (gerbers\*.*) do (
set P=%%~dpf
set E=%%~xf
echo %%f
move /-Y "%%f" "!P!%proj%!E!"
set /p x=Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment