Creati gli script per comprimere tutto in un .zip per Hostinger

This commit is contained in:
2026-04-26 16:30:24 +02:00
parent 5b671779da
commit e36a122687
2 changed files with 47 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
@echo off
setlocal
:: Nome del file zip con data e ora
for /f "tokens=1-3 delims=/" %%a in ("%date%") do set DATA=%%c-%%b-%%a
for /f "tokens=1-2 delims=:." %%a in ("%time: =0%") do set ORA=%%a%%b
set NOME_ZIP=sito.zip
echo Creazione archivio: %NOME_ZIP%
powershell -NoProfile -Command ^
"$items = @('src','static','svelte.config.js','vite.config.ts','package.json','package-lock.json','yarn.lock','tsconfig.json','recensioni.json');" ^
"$existing = $items | Where-Object { Test-Path $_ };" ^
"Compress-Archive -Path $existing -DestinationPath '%NOME_ZIP%' -Force"
echo.
echo Fatto! Archivio creato: %NOME_ZIP%
pause