Solved

Document Retention File Copy

Posted on 2011-03-25
5
235 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

744 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

10 Experts available now in Live!

Get 1:1 Help Now