Skip to content

Instantly share code, notes, and snippets.

@geekman
Created February 14, 2020 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geekman/b66797f49e3680cf665165d6dc304263 to your computer and use it in GitHub Desktop.
Save geekman/b66797f49e3680cf665165d6dc304263 to your computer and use it in GitHub Desktop.
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