Created
January 30, 2025 15:19
-
-
Save gioxx/8c75e19a59d6ff352381c10013e2b766 to your computer and use it in GitHub Desktop.
Batch che rinomina i file PDF ottimizzati da Stirling PDF, rimuovendo loro il "_Optimized" che hanno in coda al nome del file originale.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: GSolone, 2025 | |
:: Rinomina i file PDF ottimizzati tramite Stirling-PDF e toglie dal nome "_Optimized" | |
:: Inserisci questo file batch nella cartella contenente i file PDF e lancialo. Spostalo ovunque tu ne abbia necessità. | |
setlocal enabledelayedexpansion | |
set "findWord=_Optimized" | |
for %%F in (*) do ( | |
set "oldName=%%F" | |
set "newName=!oldName:%findWord%=!" | |
if not "!oldName!"=="!newName!" ren "%%F" "!newName!" | |
) | |
echo Fatto. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment