Solved

Document Retention File Copy

Posted on 2011-03-25
5
241 Views
Last Modified: 2012-05-11
I have a folder system for customers.
Each folder has a subfolder for each year since the customer folder was created i.e. x:\customer\Firstl\LetterOflastName\lastname_firstname_suffix\year.
Of this path, there may be multiple subfolders under each year.

We create a new folder each year (i.e. 2011) and delete folders older than 7 years (i.e. 2003).

We now need to keep files that contain the word "keep" somewhere in the filename.

These files must still be held in seperate folders by year, but not necessarily in the same root folder that they are in now. Is there a way to delete all files except those with *keep* in the filename. Better yet, copy files with *keep* in the filename, only in the 2003 subfolders, to a different sub-directory, while retaining the directory structure of the file? I can do a clean up by removing empty directories as a secondary step.
0
Comment
Question by:DP-Group
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
FireW0lf earned 500 total points
ID: 35216132
So X:\Microsoft\G\Gates_Bill_Mr\2010  ?

The easiest way of doing this would be to create 2 folders:
X:\All
X:\Keep

Move all folders into X:\All
Then, grab robocopy from Microsoft (it's free) as it has the ability to traverse sub directories
robocopy X:\All X:\Keep *keep*.* /S /DCOPY:T /COPYALL /MOVE

Open in new window


Option:
*keep*.* = Only act on anything with "keep" in the title
Flags used:
/S = Copy subdirectories, but not empty ones
/DCOPY:T = Copy folder timestamps
/COPYALL = Copy all file flags
/MOVE = Move, not copy

After it has completed, you should be left with X:\Keep - which contains the correct directory structure, but only the files with "keep in the name"
X:\All will contain what is left - for you to Archive onto tape and/or delete
0
 

Author Comment

by:DP-Group
ID: 35305294
Firewolf - thanks for the answer - Sorry I haven't had a chance to test yet. I am going to carve out some time to do that this week. Will post results (and hopefully an accepted solution / points). Thanks again!
0
 
LVL 4

Expert Comment

by:FireW0lf
ID: 35322816
No problem - if you decide you want to archive the whole tree, just remove the "/MOVE" option - this then COPIES instead of MOVES - so then you can archive X:\All and have a full backup before deleting it and using X:\Keep as your live copy
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 35957386
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

My purpose is to describe the basic concepts of virtual memory as implemented in a modern Windows-based operating system. I will also describe the problems inherent in older systems and how virtual memory solves them. The dark ages - before virtu…
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

932 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now