07/07/06 09:46:59 Q7SsQ7nu
@echo off
set target_drive=%systemdrive%
set latest=
pushd %target_drive%\System Volume Information
for /f "delims=" %%I in ('dir /b/ad/od _restore*') do (
pushd %%~fI
for /f %%J in ('dir /b/ad/od rp*') do set latest=%%~fJ
rem for /f %%J in ('dir /b/ad/o-d rp*') do set oldest=%%~fJ
popd
)
popd
if "%latest%" neq "" (echo %latest%) else echo *** not found ***