@echo off
for /f "delims=" %%x in ('dir /od /a-d /b *.xls') do set recent=%%x
start "" "C:\Program Files\Microsoft Office\Office11\excel.exe" "%recent%"

i'm using the above code, trying to open the most recent excel file in a folder but for some reason its only opening the a new excel file (new workbook) and not the most recent file in the folder. i'm running this batch file in the same folder where i have all the excel files.

any ideas??

Thanks