i am trying to run a batch file that extracts only .jar files with 7z.exe
here is my code:
set location=%cd%
set filename=%location%\outputfolder
set unzip=%location\resources
cd %unzip%
7z e -o%filename% -ir!*.jar -y "%filename%\*.zip"
but it gives an exception: error: incorrect command line
so i removed the -ir!*.jar
and it then gives another error: error: cannot use absolute pathnames for this command
so i changed the -o%filename%
to -oC:\outputfolder
and it works!!!!!!(here is my script now):
set location=%cd%
set filename=%location%\outputfolder
set unzip=%location\resources
cd %unzip%
7z e -oC:\outputfolder -y "%filename%\*.zip"
but i need these features
how fix?