I couldn't find any tool anywhere that could do this, so I starting writing a PHP script that would do it for me.
Here it is thus far:
<?
$dir = "C:\\directory1";
$blah = opendir($dir);
while (false !== ($file = readdir($blah))) {
if($file == "." || $file == "..")
{
}
else if($file)
{
$file = $file . ":";
$string .= $file;
}
}
$string = rtrim($string,":");
$dir1 = "C:\\directory2";
$blah1 = opendir($dir1);
while (false !== ($file1 = readdir($blah1))) {
if($file1 == "." || $file1 == "..")
{
}
else if($file1)
{
$file1 = $file1 . ":";
$string1 .= $file1;
}
}
$string1 = rtrim($string1,":");
$something = explode(":", $string);
$something1 = explode(":", $string1);
$compare = array_diff($something,$something1);
echo $compare[0];
?>
However, I'm not getting any value returned at all from the echo $compare[0]; statement.
Does it key the array differently? I've debugged the script a little bit, and it's reading the directories and exploding the listings correctly. And the rtrim is successfully removing the last colon from the end of the string. It just seems that the array_diff isn't working correctly.
Also, when I get it working correctly, how would I quickly output all the differences without having to go echo $compare[0]$compare[1] etc.?
Thanks for any help.