@echo off

set mysurveyAppData=%appdata%\MySurvey
set mysurveyLocalAppData=%localappdata%\MYSURVEY3DX_DATA

rem if exist %mysurveyAppData% (
rem    del /s /f /q %mysurveyAppData%\*.msuser
rem )

rem if exist %mysurveyLocalAppData% (
rem     del /s /f /q %mysurveyLocalAppData%\*.*
rem 	for /f %%f in ('dir /ad /b %mysurveyLocalAppData%\') do rd /s /q %mysurveyLocalAppData%\%%f
rem )

set mainDir=%~dp0

%HOMEDRIVE%
cd %HOMEDRIVE%%HOMEPATH%\Documents

set datestr=%DATE%_%TIME%
set datestr=%datestr:/=-%
set datestr=%datestr::=-%
set datestr=%datestr:,=%


"%mainDir%\MySurvey_3DS_64bits.exe" %* > "%localappdata%\MySurvey3DXTraces\MySurvey_%datestr%.txt" 2>&1