18 lines
631 B
Batchfile
18 lines
631 B
Batchfile
@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 |