I'm using this piece of code to extract my cbr/cbz files to the folders. Since I have a comic reader opens these files by default. I made this batch file and put it under shell:sendto
So I can right click a cbr file and extract it to a new folder there. It works for one file at a time.
cd /d %~dp1
"C:\Program Files\WinRAR\WinRAR.exe" x %1 "%~n1\"
It works for a single file. But I like to select 5-6 files in same folder, right click them and select send to- my batch command and extract all to their specific folders.
So I did this batch file for it:
cd /d %~dp1
:start
"C:\Program Files\WinRAR\WinRAR.exe" x %1 "%~n1\"
SHIFT
if not "%1"=="" (goto :start)
pause
But it doesn't work. How can I make my batch file recognize the files I selected while right clicking?
Edit:
I thought maybe the directory change is bugging the code, so I remove that part. Still not working for multiple files, fine for one.
:start
"C:\Program Files\WinRAR\WinRAR.exe" x %1 "%~dp1%~n1\"
SHIFT
if not "%1"=="" (goto :start)
pause