Hi All,
I am in a project where I need to find all files which are two days lesser than the current date. How can we achieve this using a batch script in Windows?
Appreciate your help !
Regards, Renju.
Hi All,
I am in a project where I need to find all files which are two days lesser than the current date. How can we achieve this using a batch script in Windows?
Appreciate your help !
Regards, Renju.
I have previously misunderstood the question. Here is the updated answer.
The syntax is a little bit different for different OS.
forfiles /d +2 (Windows Server 2008)
forfiles -d+2 (Windows 2000)
In case there is no such command in your OS, here is a link for downloading the FORFILES command.
You can even specify what you want to do for those files. Type forfiles /?
or forfiles -?
for help.