:Compress for /d %%d in (%1./*.*) do "%ProgramFiles%./WinRAR/rar" a -r -m0 -inul %1./"%%~nxd.rar" "%%~nxd" for %%f in (%1./*.*) do "%ProgramFiles%./WinRAR/rar" a -r -m0 -inul %1./"%%~nf.rar" "%%~nxf" del AutoBAK.rar MD D:/Bakup/BakUP%date:~0,10% move *.rar D:/Bakup/BakUP%date:~0,10%