To copy all contents of a plugin folder to QGIS plugins folder, you can use a batch script below (see code comments starting with rem
). What the script does in short is to copy contents of the plugin folder from a path to the QGIS plugin path. However, if the folder already exists, it overwrites it.
@echo Off
set PLUGIN_PATH="%USERPROFILE%\.qgis2\python\plugins"
set PLUGIN=plugin_folder_name
rem Create the plugin folder if it does not exist
if not exist "%PLUGIN_PATH%\%PLUGIN%" mkdir "%PLUGIN_PATH%\%PLUGIN%"
rem copy all contents to destination - /mir means -overwrite destination
robocopy "%~dp0\%PLUGIN%" "%PLUGIN_PATH%\%PLUGIN%" /mir /is /it
You need to save the above code to a batch file such as install.bat in the root folder where the plugin folder is located. If you are installing it for QGIS3 then you need to change the second line to match QGIS3 plugin path.
E:\plugin_folder_name
E:\install.bat
If you want to combine your plugin with QGIS Installer, then you need an NSIS script like this one.