I am quiet new on this environment, my question is that, I am using 7z for compressing files, but could you help me about how to do it with the .zip extension? Due to I am a dummy about batch, I just created environmental variables and I can copy move files from one to other. But getting a file with the zip extension is hard for me. I have been seraching it for along time. And also I have another quesion about this batch, I can run it on my own computer with Windows 7 OS, however I cannot do the same with my customer's computer where I want to run this script on Microsoft SQL Server 2012, by the way the master folder's name has space and I get error with it too.
echo off
if not exist "C:\Pack" mkdir %genericPath%\Pack
if not exist "C:\ProAgent" mkdir %genericPath%\Pack\ProAgent
if not exist "C:\ProAgent1230" mkdir %genericPath%\Pack\ProAgent1230
xcopy /b /v /y /s %genericPath%\Filter-Inventory\filter.ini %genericPath%\Pack\ProAgent
xcopy /b /v /y /s %genericPath%\Filter-Inventory\pvinvent.ini %genericPath%\Pack\ProAgent
xcopy /b /v /y /s %genericPath%\Registry\updateProAgent.reg %genericPath%\Pack\ProAgent1230
xcopy /b /v /y /s %genericPath%\Files\$update$.bat %genericPath%\Pack\ProAgent1230
xcopy /b /v /y /s %genericPath%\Files\runscript.vbs %genericPath%\Pack\ProAgent1230
xcopy /b /v /y /s %genericPath%\Files\runupdate.bat %genericPath%\Pack\ProAgent1230
xcopy /b /v /y /s %genericPath%\Files\updateAgent.cmd %genericPath%\Pack\ProAgent1230
:Archieve
set archievePatch= %genericPath%\Pack
7z.exe a %genericPath%\Pack "%archievePatch%"
rmdir /s /q "%genericPath%\Pack"
PATH %genericPath%\FF
exit