List files over x hours old

Microsoft Windows ultimate 64-bit 7
December 2, 2010 at 15:05:58
Specs: Windows 2003
Is it possible in a batch file to list files over 2 hours old I know you can list files over a day or so but I wanted to try and check a folder and if a file has been created over 2 hour and had not been picked up by another application to trigger an alert.



See More: List files over x hours old

Report •

#1
December 5, 2010 at 14:47:21
Hi James
A lot depends on your Date & Time formats.
What does the code below produce

@echo off
for %%a in (*.*) do (
echo %%~ta
)


Report •

#2
December 6, 2010 at 14:56:40
Thanks dtech10 I think I had seen comment before its intresting

On win7 responce is

07/12/2010 09:49 AM


On windows 2000 the out put is very strange just runnign it once creates all of these time stamps.

08/04/04 11:00p
06/23/09 02:58p
06/27/05 11:27p
09/19/08 09:32a
03/18/08 10:59a
09/02/09 12:19p
10/08/09 02:48p
08/04/04 11:00p
06/17/09 02:57p
01/22/06 05:20p
03/02/07 02:32p
07/08/09 01:09p
07/02/09 04:38p
12/07/10 09:50a
08/18/01 06:03a
10/08/09 02:32p


Report •
Related Solutions


Ask Question