@ECHO OFF
DIR/B/S *.PNG > dirlist.txt
FOR /F "tokens=*" %%f IN (dirlist.txt) DO "D:\Program Files\WinRAR\rar.exe" a -k "%%f.rar" "%%f"
DEL dirlist.txt
PAUSE
DIR/B/S *.PNG > dirlist.txt
FOR /F "tokens=*" %%f IN (dirlist.txt) DO "D:\Program Files\WinRAR\rar.exe" a -k "%%f.rar" "%%f"
DEL dirlist.txt
PAUSE