<cmd> set j=%DATE:~3,4%_%DATE:~8,2%_%DATE:~11,2% for %%i in (D:\SQLBACKUP\*%j%*.*) DO 7z.exe a -tzip "D:\BACKSQLRAR\%%~ni.zip" "%%i" </cmd>