It will use the latest file found by dir /od. There is no way to read a fileversion without additional tools.
There are three dates associated with a file, creation, last access and last write access. You can add the switch /TC, /TA or /TW to change the date to sort for, if you add /TC it should work fine.
Btw, there is a small bug: It doesn't sort correctly, it lists files in the order they were written to the disk (which actually might work just fine, even better than to sort for a specific date).
Probably better is:
Code:
@echo off
del sclist.txt 2> nul
dir simulationcraft.exe /b/od/s/x/tc >sclist.txt
for /f "delims=" %%i in (sclist.txt) do (
set lastsc="%%i"
)
for %%i in (%lastsc%) do set scpath=%%~di%%~pi
cd "%scpath%"
start "" "%lastsc%"
set lastsc=
set scpath=