@echo off
Title autozip.bat
REM updated 30/07/2015
REM created by: Anonymous
REM modified by: Yashwant Vishwakarma
REM This script compresses files in a folder Note: files with the same name
REM but with different extensions will be in the same archive.
path=%path%;"c:\program files\winrar"
REM ****************** Folder to compress******************
set dir=C:\testzip
REM *******************************************************
REM change to directory
cd %dir%
echo Folder to compress in *.RAR format:
echo %dir%
echo Compressing files started....
REM Compress files in directory individually without subdirectories
echo.
FOR %%i IN (*.*) do (
rar a "%%~ni" "%%i"
)
goto eof
For more commands and syntax follow winrar command line help online
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Author
Commented:Have a great day ahead :)
Keep smiling n shining always :)
Stay blessed :)