@echo off

:: ========== CONFIGURATION ==========
set "TARGET_FOLDER=C:\Users\it-1\Desktop\1"
:: Example: set "TARGET_FOLDER=C:\Temp\Work"
:: ===================================


:: Check if folder exists
if not exist "%TARGET_FOLDER%\" (
    echo ERROR: The folder does not exist: %TARGET_FOLDER%
    pause
    exit /b
)

:: Clear all files and subfolders inside the folder
echo.
echo Clearing contents of: %TARGET_FOLDER%
echo.

del /f /q "%TARGET_FOLDER%\*" >nul 2>&1
for /d %%d in ("%TARGET_FOLDER%\*") do rd /s /q "%%d" >nul 2>&1

echo SUCCESS: All contents have been deleted.
echo The folder itself remains intact.
