-
-
Notifications
You must be signed in to change notification settings - Fork 892
Expand file tree
/
Copy pathdb_compress.cmd
More file actions
29 lines (24 loc) · 603 Bytes
/
db_compress.cmd
File metadata and controls
29 lines (24 loc) · 603 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
:: Detect It Easy databases compressor for Windows (NTFS)
:: Coded by DosX, https://github.com/DosX-dev
@echo off
call :compact_it "db"
call :compact_it "db_extra"
call :compact_it "db_custom"
call :compact_it "dbs_min"
exit /b 0
:compact_it
set "path_to_dir=%~1"
if not exist "%path_to_dir%" (
echo "%path_to_dir%" not found!
exit /b 1
)
pushd "%path_to_dir%"
"%windir%\system32\compact.exe" "*" /C /S /F /I /A /Q /EXE:LZX >nul
if "%errorlevel%" == "0" (
echo [V] "%path_to_dir%" compressed!
) else (
echo [X] "%path_to_dir%" unable to compress!
)
popd
set "path_to_dir="
exit /b 0