![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 2598 Date : 2002-08-04 Author : Kan Yabumoto Subject : Re: Delete Files not Accessed in 730 Days Size(KB) : 3
To delete files that have not been "Accessed" in the past 730 days, use the following command line. xxcopy \src\ /rs/db#731/fa The three switches are the most essential ones for you /RS // remove files from the source directory /DB#731 // filedate on or before 731 days ago /FA // filedate using last access (as opposed to last write) You may add any of the following /S // include sub directories /H // include hidden/system files /R // delete even read-only files /ED // preserve empty directories You will likely to encounter a number of warning prompts. Please read all of them and understand what they mean before you dismiss. To suppress a warning, type '?' on the prompt and you will see a short help text on the occasion. /RSY /PD0 are also common switch to use. But, don't be lazy and please read the doc especially any of the switches that you are going to use. Else, you will be sorry. Once you delete a file, there is no taking it back. If you don't want to lose any file, make sure you backup *ALL* files to some place safe (e.g., on a backup volume elsewhere). You will see a lot of warning messages especially when you do a destructive (delete) operations. You may disable *ALL* user-prompts by /YY (super-Y), but I don't recommend this because you are apparently ignorant on how dangerous things are. Warning is for your protection. -------------------------------------------------------------- Lastly, let me remind you that what you are trying to accomplish is likely to fail --- the Last-Access timestamp is not as useful as you hope it to be. For this one, you have only Microsoft to blame. I'm going to explain the reason for this in my next message. Kan Yabumoto ======================================================= At 2002-08-03 19:31, you wrote: >Hello, > >I'm new to xxcopy. In fact, I just downloaded it today. I browsed >through the reference material on the xxcopy Web site, but at first >glance, I did not see the commands required for what I need to do, so >I thought I would post the question here. > >I need to delete all files that have not been accessed in at least >730 days. The files reside in a data folder, so there is no danger >of deleting system or application files. > >I need to make an important distinction here. I have to delete files >not ACCESSED in 730 days. I don't care about the CREATION date or >the SAVE date of the files--I only care about when the file was last >ACCESSED. Why is this important? Because we have all kinds of shell >documents that were created years ago that we still use on a regular >basis. Those files were created more than 730 days ago, and because >we rarely change those files, the save dates on the files are also >more than 730 days ago. However, we ACCESS many of those files on a >daily or weekly basis. I need to distinguish between old files that >are still used regularly, and old files that have not been used for >the last two years. I need to keep the files that are still used >regularly, and delete the files that we no longer use. > >I posted this question in another group and was referred to xxcopy. >Does anyone know how to do this with xxcopy? > >--Tom
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.