Posts

Showing posts from November, 2010

How to copy last updated file into other location by command batch

this scripts copy lastlly updated file from given path into target path.It looks only selected directory it does not look for sub-directory. just create xxx.bat and call with 2 parameters usage : xxx.bat source_path target_path ex: command.bat d:\sil\from d:\sil\to
::Copy Files Made Or Modified Today @echo off
set y=0 set source=%1 set dest=%2 pushd "%source%" for /f %%a in ('dir /b /a-d /o-d') do call :PROCESS "%%a" popd goto :eof :PROCESS if %y%==0 copy %1 "%dest%" if %y%==0 set y=1