Solved Moving last modified file to folder

September 6, 2012 at 04:33:29
Specs: Windows XP
Hi all, Please your advice.
I have several text files and need move the last modified file to folder c:\Last.
Please advice what is the MS DOS script?
Thanks for your help.

See More: Moving last modified file to folder

Report •


#1
September 6, 2012 at 05:07:56
✔ Best Answer
:: ===== script starts here ===============
::
:: alexlast.bat 2012-09-06 19:03:58.09
@echo off > newfile & setLocal enableDELAYedeXpansioN

for /f "tokens=* delims= " %%a in ('dir/b/o-d *.txt') do (
echo move %%a c:\last
goto :done
)
:done
::====== script ends here =================


====================================
Life is too important to be taken seriously.

M2


Report •

#2
September 6, 2012 at 05:32:34
Super!!!... It works...
Many thanks for Super M2.....

Report •

Related Solutions


Ask Question