:: MD "C:\test\%%~nR"
for /F "delims=." %%R in ('dir /b U:\Archive_200803*.rar') do unrar e "U:\%%R" FolderB\File.bak "C:\test\%%~nR"
1st post
Since I just finished getting a batch script working to unrar password-encrypted RAR files,
I knew there was an easier way... even if this thread is old, it could help others.
The make directory MD is not necessary since original poster said it would exist.
As well, the previous code example was creating and destroying directories each time for each archive
that it found... makes everything slow and was not necessary... only needed before and after for loop.
For my example, you can extract the file directly without the tree structure by using "
unrar e" instead
of "unrar x", and you can also specify the output directory as the
last parameter.
Enjoy!