sorry dear devcom
i forgot to tell you i tried your codes yesterday but maybe it's me that has problem
not codes !!
i tried this
for /f "tokens=*" %%A in ('dir /b /A-D *.exe') do (
echo %%A %%~zA %%~tA
)now i have this report in CMD window
java2.exe 275238 02/03/2008 11:50 AM
now what? how should i put these codes inside program?
i tried this (i removed file's size this time to find out what's the problem)
@echo off
setLocal EnableDelayedExpansion
for %%a in ("java2.exe") do set var1=%%~tA
if %var1% equ 02/03/2008 11:50 AM goto next
if %var1% NEQ 02/03/2008 11:50 AM echo>error.txt
)
i added red line to see which line has picked by program and always red line is selected !!
what's the correct pattern for putting file's date?
i even tried all below codes
02/03/2008 11:50
or
02/03/2008
or
2008/03/02
what's wrong?