I want to use this code in a batch. First step is to input source folder which tree would look like this:
What I want to achieve is to extract every type of archive within the source folder to the same folder where the archive is located, eg. "archive.zip" directly to "folder1".
Have this code below but don't have any clue how to set the destination variable.
SET /P "source="
FOR %%F IN ("%source%\*.zip") DO "C:\Program Files\7-Zip\7z.exe" x "%source%\%%~nF.zip"
FOR %%F IN ("%source%\*.7z") DO "C:\Program Files\7-Zip\7z.exe" x "%source%\%%~nF.7z"
FOR %%F IN ("%source%\*.rar") DO "C:\Program Files\7-Zip\7z.exe" x "%source%\%%~nF.rar"