Backup Home Assistent with a shedue job
Batch Job
net use p: 192.168.0.141config /user:user Password
@ECHO OFF &SETLOCAL enableDelayedExpansion
FOR %%a IN (Monday Tuesday Wednesday Thursday Friday Saturday Sunday) DO SET /a cnt+=1&SET “DOW!cnt!=%%a”
FOR /f “tokens=1-4” %%a in (‘wmic path win32_currenttime get Day^,Month^,Year^,DayOfWeek^|findstr /v “^$”‘) DO (
IF %%a LEQ 9 (SET “Day=0%%a”) ELSE SET “Day=%%a”
IF %%c LEQ 9 (SET “Month=0%%c”) ELSE SET “Month=%%c”
SET “Year=%%d”
SET “DayOfWeek=%%b”
)
ROBOCOPY “p:” “G:My DriveBackup HomeAssistentAutomaticBackup!DOW%DayOfWeek%!_%Day%%Month%%Year%” /MIR