We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Compare directories, delete files from one that aren't in the other

charlietou
charlietou asked
on
Medium Priority
198 Views
Last Modified: 2010-04-13
Hi folks,

I am using xcopy as a backup mechanism from one drive to another.  Periodically, I want to clean out the backup and delete any files that have been deleted from the source.  Can someone let me know an efficient way to do this?

Thanks.
Comment
Watch Question

map a drive letter from one to the other
use a third party utility, Duplicate File Manager to find and delete the duplicates.

OR

upgrade your process from xcopy to syncback, (third party) it has many options including delete on B if deleted from A
CERTIFIED EXPERT
Top Expert 2013

Commented:
As Carl suggested, you can use a 3rd party tool. I use 2xExplore. It allows you to mirror file structures in a left and right window so you can very quickly, browse though folders and compare, add, and delete.
http://www.snapfiles.com/get/2xexplorer.html
--Rob
Senior Systems Engineer
CERTIFIED EXPERT
Commented:
Have you tried robocopy from Windows Server 2003 Administration Tools Pack?
http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
rleepy,

Do you know if robocopy will run on Win2K?
Roland LeeSenior Systems Engineer
CERTIFIED EXPERT

Commented:
Should be able to.
Note: The Windows Server 2003 Resource Kit Tools are not supported on 64-bit platforms.
Another tool you might try is calle Unison.  If you've ever used rsync in a UNIX environment it keeps directories in sync with eachother.  It has a commandline and a GUI version so you can work with what you are comfortable with.

http://www.cis.upenn.edu/~bcpierce/unison/

Brian
CERTIFIED EXPERT
Top Expert 2013

Commented:
charlietou, did any of the above suggestions work for you?
--Rob

Author

Commented:
Hi,

I haven't had a chance to actually try them out, but Robocopy looks like the best option for me at this point.

The client I would be using this for has literally thousands of directories within his file structure, and I'd need an automated tool for doing the comparison and deletion.  2XExplorer looks like a nice tool (I haven't gone beyond the description page) but it looks like I'd have to do much of the comparison myself.  I'm willing to be corrected if that's not the case.

Thanks,

Charlie T.
CERTIFIED EXPERT
Top Expert 2013
Commented:
Thanks for the update Charlie. I agree, if you need it automated, RoboCopy would be a much better way to go. It will definitely work with Win2K by the way. It even works with NT. I have seen numerous recommendations in the past suggesting best to use the newest/XP version, which is backward compatible, as it eliminates a few bugs.
Good luck,
--Rob

Author

Commented:
Thanks everyone for your input.

Have a good day, (or night, depending on when you read this :-) ),

Charlie T.

CERTIFIED EXPERT
Top Expert 2013

Commented:
Thanks Charlie,
--Rob
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.