@echo off
set solutionname=MVIPersonSearchOther

for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"

set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%"
set "fullstamp=%YYYY%%MM%%DD%-%HH%%Min%%Sec%"
REM echo datestamp: "%datestamp%"
REM echo timestamp: "%timestamp%"
REM echo fullstamp: "%fullstamp%"

set logfile=solution-extract-only-sp_log%fullstamp%.log
REM echo %logfile%
rd source /s /q
mkdir source
tools\solutionpackager.exe /action:Extract /zipfile:"%solutionname%.zip" /folder:source /errorlevel:verbose /allowWrite:Yes /allowDelete:Yes /log:logs\%logfile% /clobber