3

I have lots of folders in D:\FolderA and at some point most (but not all) of the folders where copied to D:\FolderB. What is the best way to list all the "missing" folders in FolderB?

2 Answers 2

2

If you're on Windows XP, you can use Windiff.exe utility to compare two directories.

Another alternative is to use WinMerge which is an open-source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle. Below are some screenies.

Folder Comparison Results:

Folder Comparison Results

Folder Compare Tree View:

Folder Compare Tree View

1
  • Thank you for your tip on WinMerge. Didn't know it could do that :)
    – Espo
    Jan 25, 2011 at 12:28
1

This should be easy enough in PowerShell.

Aim: Get a list of all the sub-folders of folder $SourceFolder for which a folder with the same name does not exist under folder $DestFolder. Put the following in a script file:

param([string]$SourceFolder, [string]$DestFolder)

Get-ChildItem $SourceFolder| Where-Object { $_.PSIsContainer -and -not (Test-Path ( Join-Path $DestFolder$_.Name ))}

The output can then be saved into a file or further processed (eg. to create a script to copy the missing folders).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .