Archive Files / folders for 7 days old

Posted on 2012-09-09
Medium Priority
Last Modified: 2012-09-19
forfiles -p "E:\Test\Daily Report" -s -m *.* -d -7 -c "cmd /c del @path"

How to modify the above command such that

1. it could archive folders (beside files) older than 7 days
2. disable any error message in case it couldn't match the searching criteria

Question by:AXISHK
LVL 17

Accepted Solution

Kent Dyer earned 2000 total points
ID: 38381734
Here are a number of ways to do this task including using a VBS..




Author Comment

ID: 38381747
Thanks but can I archive the same purpose with DOS Script ?

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question