Creati gli script per comprimere tutto in un .zip per Hostinger
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user