Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64 Windows 8.1 x64
 
 

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   #3

Microsoft Community Contributor Award Recipient

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

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

Microsoft Community Contributor Award Recipient

Windows 7 Ult. x64 Windows 8.1 x64
 
 

My System SpecsSystem Spec
Reply

 Move files older than 365 days




Thread Tools




Our Sites

Site Links

About Us

Find Us

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

All times are GMT -5. The time now is 05:15 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

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 33