Variables are not behaving as expected
im trying to make a bat file that backs-up my minecraft world (windows 10 edition/uwp).
@echo off
cd..
TASKLIST /FI "IMAGENAME eq Minecraft.Windows.exe" 2>NUL | find /I /N "Minecraft.Windows.exe">NUL
IF "%ERRORLEVEL%"=="0" (
for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x
set time=%Day%-%Month%-%Year%_%Hour%-%Minute%-%Second%
robocopy OCtlXsaoAgA=_non-corrupted "C:\Users\itzep\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\minecraftWorlds\1Backups\backup%time%" -e -copy:da
)
pause
its supposed to check if minecraft is active (that works fine btw) and then make a copy of a specific folder and put the current time and date after the new folder. This works fine without the check, but with just doesnt do anything. it just names the folder 'backup'. i have no idea why this doesnt work
pls help