@ECHO OFF
CLS
SETLOCAL

IF /i "%1" == "" GOTO ERROR

SET DESTINATIONPATH="FM32XX Configurator %1"
rd /S /Q %DESTINATIONPATH%
md %DESTINATIONPATH%

copy /y "default.xml" %DESTINATIONPATH%
copy /y "FM32XX Configurator.exe" %DESTINATIONPATH%
copy /y "FM32XX Configurator.exe.config" %DESTINATIONPATH%
copy /y "FM32XXConfigurator.Common.dll" %DESTINATIONPATH%
copy /y "FM32XXConfigurator.Configuration.dll" %DESTINATIONPATH%
copy /y "FM32XXConfigurator.Protocol.dll" %DESTINATIONPATH%
copy /y "IPAddressControlLib.dll" %DESTINATIONPATH%
copy /y "GlobalParameters.xsd" %DESTINATIONPATH%
copy /y "Profile.xsd" %DESTINATIONPATH%
copy /y "Sensors.xsd" %DESTINATIONPATH%
copy /y "log4net.config.xml" %DESTINATIONPATH%
copy /y "log4net.dll" %DESTINATIONPATH%
copy /y "TCoreLib.dll" %DESTINATIONPATH%
copy /y "Teltonika.Windows.Forms.dll" %DESTINATIONPATH%

GOTO END

:ERROR
echo You should specify version (AA.BB.CC.DD) as parameter
echo In example %~nx0 1.0.50.0

:END
ENDLOCAL