Windows 7 Forums


Windows 7: Move files older than 365 days

30 Oct 2012   #1

windows 7 64bit
 
 
Move files older than 365 days

I have a set of files I would like to archive and thing older than 1 year or 365 days. I have been trying to to use the xcopy or move commands but have not been able to to get this to work. Anyone have any thoughts on how to do this in a batch file? Thanks.

My System SpecsSystem Spec

31 Oct 2012   #2

Windows 7 Ultimate SP1 (x64)
South Australia
 
 

Hi,

Try ROBOCOPY. Type robocopy /? at the command prompt to see the options. You are probably interested in the /MOVE AND /MAXAGE:n switches.

Example:
Code:
robocopy E:\DataFiles Z:\Backup\DataFiles /MOVE /MAXAGE:365
Moves all files in E:\DataFiles that are older than 365 days into Z:\Backup\DataFiles. robocopy commands can be incorporated into batch files just like copy or xcopy.

Regards,
Golden

Last edited by Golden; 31 Oct 2012 at 09:07 AM.. Reason: fix spelling
My System SpecsSystem Spec
31 Oct 2012   #3

Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
SecretCity
 
 

Quote   Quote: Originally Posted by CBHV View Post
I have a set of files I would like to archive and thing older than 1 year or 365 days. I have been trying to to use the xcopy or move commands but have not been able to to get this to work. Anyone have any thoughts on how to do this in a batch file? Thanks.
With older than 365 days you mean "not modified last 365 days" or "not created last 365 days"? If you mean "not modified last 365 days" ... do what user Golden told you
My System SpecsSystem Spec
.


31 Oct 2012   #4

windows 7 64bit
 
 

That did it had did not know about maxage. Thanks for help Golden.

Quote   Quote: Originally Posted by Golden View Post
Hi,

Try ROBOCOPY. Type robocopy /? at the command prompt to see the options. You are probably interested in the /MOVE AND /MAXAGE:n switches.

Example:
Code:
robocopy E:\DataFiles Z:\Backup\DataFiles /MOVE /MAXAGE:365
Moves all files in E:\DataFiles that are older than 365 days into Z:\Backup\DataFiles. robocopy commands can be incorporated into batch files just like copy or xcopy.

Regards,
Golden
My System SpecsSystem Spec
31 Oct 2012   #5

Windows 7 Ultimate SP1 (x64)
South Australia
 
 

My System SpecsSystem Spec
Reply

 Move files older than 365 days problems?



Thread Tools



Similar help and support threads for: Move files older than 365 days
Thread Forum
Solved .reg files open Notepad - do not change registry to read older files Microsoft Office
Can't move folders with files, but can move files General Discussion
Move Program FIles to SSD - Leave Users files Behind General Discussion
Move contents of a folder x days after being created? Software
Help with choppy sound from older wav files? Sound & Audio


All times are GMT -5. The time now is 10:51 AM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32