Rick Coloccia wrote: > Hi Folks- > > I'm looking for a way to list all of the directories in a share that are > new. I don't care about their contents. > > Example: > > share is called \\files\users > > in \\files\users are three directories: > abc1 > abc2 > abc3 > > There could be any amount of goo inside each of these folders. > > Let's say > abc1 was created 1 month ago > abc2 was created 3 weeks ago > abc3 was created yesterday > > I want to write some sort of script that returns the names of all > directories that are under a week old, so it would come back and say: > > abc3 > > since that one is fresh. > > Once I know which ones are new, I mean to make some security changes on the > folders. > > Any suggestions?
stat the subdir and subtract it's ctime ($stat[10]) from time() and divide by 86400 for days or subtract 886400 * $numdays to see if it's older than that number of days. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers) _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
