I use an ancient version of utorrent but it has one disastrous bug. like .0015 of the time it'll randomly delete all your torrents by your user file corrupting. and there's no backups in this version
so I asked AI to make me a script to backup my utorrent daily. it actually works
@echo off
REM === CONFIG ===
set SRC=C:\Users\x\AppData\Roaming\uTorrent
set DEST=D:\Backups\uTorrent
set LOG=%DEST%\backup.log
REM === Get reliable date from PowerShell ===
for /f %%i in ('powershell -NoLogo -NoProfile -Command "(Get-Date).ToString(\"yyyy-MM-dd\")"') do set DATESTAMP=%%i
set TARGET=%DEST%\%DATESTAMP%
echo [%DATESTAMP% %TIME%] Starting backup... >> "%LOG%"
echo Target folder: "%TARGET%" >> "%LOG%"
robocopy "%SRC%" "%TARGET%" /MIR /R:1 /W:1 >> "%LOG%" 2>&1
REM Keep only 5 most recent backups
for /f "skip=5 delims=" %%i in ('dir "%DEST%" /ad /b /o-d') do (
echo [%DATESTAMP% %TIME%] Deleting old backup: %%i >> "%LOG%"
rd /s /q "%DEST%\%%i"
)
echo [%DATESTAMP% %TIME%] Backup completed. >> "%LOG%"