Re: move files based on modified date

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Michael,
I ended up using robocopy w/ the minage switch.

robocopy \\%dfsroot%\archive \\%dfsroot%\archive\_tmp_bkp_ /E /MOVE
/MINAGE:21 /LOG:d:\scripts\archive.log /R:0 /XX /NP /XD
\\%dfsroot%\archive\_tmp_bkp_

I realize that %dfsroot% is not a variable but I work for the gov't and had
to take out the correct path ~halldah

"Michael Bednarek" wrote:

> On Wed, 13 Jul 2005 07:07:05 -0700, "halldah"
> <halldah@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> microsoft.public.windows.server.scripting:
>
> >I have a requirment to move files based on their modified date; specifically,
> >I need to move files that haven't been modified in the last 365 days. I am a
> >newbie to scripting. I tried to use a combination of "forfiles" and
> >"robocopy" but with out success. help
>
> It's trivial with a decent CLI. With 4NT:
> MOVE /[d-365,1980/1/1] d:\dir1\*.* d:\dir2\
>
> 4NT's Date Ranges are documented at
> <http://jpsoft.com/help/dateranges.htm>. Date Ranges also allow to
> distinguish between date of creation, modification, and access (if
> enabled).
>
> 4NT is a commercial product; the same can be done with 4DOS which is
> free and also works under any version of NT.
>
> OTOH, I don't see why
> FORFILES -d-365 -c"CMD /c MOVE @FILE d:\dir2\"
> should not work. Similarly:
> ROBOCOPY /MINAGE:365 d:\dir1 d:\dir2 *.*
> should work. What exactly do you enter and what is the result?
>
> --
> Michael Bednarek http://mbednarek.com/ "POST NO BILLS"
>
.



Relevant Pages

  • Re: Caculated Measure - Date Filter - Range
    ... Michael G. Schneider wrote: ... different date ranges ... In data source view right-click on a table, ...
    (microsoft.public.sqlserver.olap)
  • Re: Countif help!!!
    ... Tom Ogilvy ... Thanks Michael. ... >>>need to calculate the different ranges. ...
    (microsoft.public.excel.newusers)
  • Re: Caculated Measure - Date Filter - Range
    ... different date ranges ... In data source view right-click on a table, ... Michael G. Schneider ...
    (microsoft.public.sqlserver.olap)
  • Re: Countif help!!!
    ... Thanks Michael. ... > *Hi Bellis ... >>need to calculate the different ranges. ...
    (microsoft.public.excel.newusers)