File Modified/Change Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

anyone know of a tool that i can use to carry out an analysis on a large NTFS
directory of files to determine things like:
files that have not changed in x number of years/months
files that have not been accessed in x number of years/months

thanks,
 
anyone know of a tool that i can use to carry out an analysis on a large NTFS
directory of files to determine things like:
files that have not changed in x number of years/months
files that have not been accessed in x number of years/months

thanks,


Using DatePorM from tip 8293 in the 'Tips & Tricks' at http://www.jsifaq.com
I have scripted AnalDT.bat. The syntax is:
AnalDT A|C days path
where the first parameter is an A for date Accessed or a C for date Changed or Created.,
days is the number of days ago
and path is C or C:\user or D: etc..

@echo off
setlocal ENABLEDELAYEDEXPANSION
if {%3}=={} goto err
set AC=%1
set /a days=10000%2%%10000
if %days% LSS 0 goto DTN
set /a days=0 - %days%
:DTN
set where=%3
if /i "%AC%" EQU "A" goto OK
if /i "%AC%" NEQ "C" goto err
set AC=W
:OK
if not exist %where% goto err
call DatePorM %days% DT
set DTC=%DT:~6,4%%DT:~0,2%%DT:~3,2%
for /f "Tokens=*" %%a in ('dir /b /s /a /a-d %where%') do (
for /f "Tokens=1,2,3 Delims=/ " %%f in ('dir /a /T%AC% "%%a"^|FIND "/"') do (
set MM=%%f
set DD=%%g
set YY=%%h
set YY=!YY: =!
set /a MM=100!MM!%%100
set /a DD=100!DD!%%100
if !MM! LSS 10 set MM=0!MM!
if !DD! LSS 10 set DD=0!DD!
set DTF=!YY!!MM!!DD!
if "!DTF!" LEQ "%DTC%" @echo "%%a","!DTF!","%AC%"
)
)
endlocal
goto :EOF
:err
@echo Syntax: AnalDt A^|C days Path
endlocal


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top