You can use a batch file to do the task. I copied the following batch file that appears in the web page of Computing Tidbits titled "Using the WinRAR Command-line tools in Windows"
It reads:
"Two batch file examples are provided. The first compresses all files in a folder or a folder and its subfolders, with the option to compress the files into a single archive or individually. The second batch file decompresses all .rar files from a folder and places the extracted files into another directory. Be sure to change the extension(s) to .bat before using either file. Both of the following batch files temporarily set the Windows path environment variable for the WinRAR folder when executed."
Please visit their page for a thourough explanation of how it wroks
I copied the contents of the second batch file. You can copy the text to a .bat text file and execute it.
Copy from the following line to the end
@echo off
REM uncompress_rar.bat
REM This uncompresses .rar archives in a folder specified by the user, extracts files to
the extracted folder and moves the processed archive to the completed folder
setlocal
REM Specify the folder to uncompress below:
REM -------------------------------- Compressed file folder_----------------------------
set dirA=C:\folder_to_uncompress
REM ------------------------------------------------------------------------------------
REM Specify the extracted files folder below:
REM -------------------------------- Folder to extract to-------------------------------
set dirE=C:\Extractedfiles\
REM ------------------------------------------------------------------------------------
REM Specify where to move processed archives below. This folder must exist:
REM -------------------------------- Processed folder-----------------------------------
set dirC=C:\Processed\
REM ------------------------------------------------------------------------------------
REM change to directory
cd %dirA%
REM Path to WinRAR executable in Program Files
set path="C:\Program Files\WinRAR\";%path%
echo.
echo All files in %dirA% to be uncompressed
echo.
echo.
FOR %%i IN (*.rar) do (
unrar e "%%~ni.rar" "%dirE%"
move "%%~ni.rar" "%dirC%"
echo completed uncompressing "%%i" and moved archives or archive to "%dirC%"
)
goto eof
:eof
endlocal
echo.
echo "Task Completed"
echo.
@pause