[Android General] Abhinav1997:
Disclaimer

I have made this tutorial just to help people and share what I learnt. This tutorial in no way can cause any damage. But in case you yourself have done something wrong, I will be in noway responsible for it.

Pre-requisite knowledge:

1. A little knowledge about batch commands cause I'm not going to explain the basic commands like ECHO, PAUSE, CLS or similar commands here.

2. How to use a PC and keyboard.

Things Needed:

1. Notepad++ (Google it!)

2. A 7z file.(Most important)- Get it from here.

3. A windows machine.

4. An unbricked brain.

5. Kindness to press THANKS.

How to do it?

1. Open notepad and enter the following command to start your coding:

@echo off
color 1f
title Zipper Unzipper by alokbina

You can replace the title with whatever you desire. The title comes at the title bar of your CMD window.

2. Now making your menu for creating the 2 desired options. For that leave a line after writing the above code and write the following code:

echo.
echo Please select one of the following options you want to do :
echo.
echo 1.Unzip/Extract zip file.
echo 2.Compress/Zip/Archieve files and folders.
echo x.Exit
echo.
set /p se=Select your decision
if %se%==1 (goto unzip)
if %se%==2 (goto zip)
if %se%==x (goto exit)

Here you can change the word "se" with your desired letters but be sure to also change all the "se" with the same letters.

2. Now make 3 folders in the directory where you are making the tool named as COMPRESS, EXTRACT and zip. In the zip directory place the 7za file that you downloaded. And in both the other diectories, i.e., COMPRESS and EXTRACT make a folder named INPUT in each folder.

In the /COMPRESS/INPUT folders you will place the files you want to make a zip and in the /EXTRACT/INPUT folder, you will place the zip that you want to extract.

3. After that we will build our first menu, that is, the unzipping menu. Use the following code for that:

:unzip
cls
echo.
echo Please place the zip file, i.e. the zip you want to extract in /EXTRACT/INPUT directory.
echo.
pause
echo Extracting...
echo.
mkdir %cd%\EXTRACT\OUT
if exist "%cd%\EXTRACT\INPUT\*.zip" (call %cd%\zip\7za.exe x "%cd%\EXTRACT\INPUT\*" -o"%cd%\EXTRACT\OUT")
echo All done! Congrats. You can find the extracted files in /EXTRACT/OUT directory.
echo.
pause
goto exit

Here the mkdir command will make a directory in the /EXTRACT folder named as OUT where you can see the the extracted files.

4. Now time to build the zipping menu. Use the following code for that:

:zip
cls
echo.
echo Please place the files and folder you want to compress in /COMPRESS/INPUT directory.
echo.
pause
echo COMPRESSING...
echo.
mkdir %cd%\COMPRESS\OUT
start %cd%\zip\7za a -mx9 -tzip "%cd%\COMPRESS\OUT\compressed.zip" "%cd%\COMPRESS\INPUT\*"
echo All done! Congrats. You can find the compressed zip in /COMPRESS/OUT directory.
echo.
pause
goto exit

Here mkdir will make a directory in the /COMPRESS folder named as OUT where you can see the the compressed files named as compress.zip. Here the start command will order the 7za file to compress the files. Thus another window will open for compression.

5. Now finally making the exit command. Use the following code for it:

:exit
exit

So finally you will have 3 folders-COMPRESS, EXTRACT and zip. In zip folder you will have one file 7za and in the other 2 folders you will have a folder named INPUT in each. Your final coding will be something like this:

@echo off
color 1f
title Zipper Unzipper by alokbina

echo.
echo Please select one of the following options you want to do :
echo.
echo 1.Unzip/Extract zip file.
echo 2.Compress/Zip/Archieve files and folders.
echo x.Exit
echo.
set /p se=Select your decision
if %se%==1 (goto unzip)
if %se%==2 (goto zip)
if %se%==x (goto exit)

:unzip
cls
echo.
echo Please place the zip file, i.e. the zip you want to extract in /EXTRACT/INPUT directory.
echo.
pause
echo Extracting...
echo.
mkdir %cd%\EXTRACT\OUT
if exist "%cd%\EXTRACT\INPUT\*.zip" (call %cd%\zip\7za.exe x "%cd%\EXTRACT\INPUT\*" -o"%cd%\EXTRACT\OUT")
echo All done! Congrats. You can find the extracted files in /EXTRACT/OUT directory.
echo.
pause
goto exit

:exit
exit

Now you can successfully share your tool.

Note-You can practically change all the text written after : (the colon) but make sure to edit the goto command in the same way. :)

Dont forget to hit THANKS :D