Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<title>Duplicate File Finder</title>
</head>
<body>
<table border="1">
<tr>
<th>Filename</th>
<th>Exists In Target Folder?</th>
<th>Same Size?</th>
<th>Same Created Date?</th>
<th>Same Modified Date?</th>
</tr>
<%
Dim objFSO
Dim strSourcePath, strTargetPath
Dim objSourceFolder
Dim objFile
Dim objSourceFile, objTargetFile
strSourcePath = Server.MapPath("folder1")
strTargetPath = Server.MapPath("folder2")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objSourceFolder = objFSO.GetFolder(strSourcePath)
For Each objFile In objSourceFolder.Files
Response.Write "<tr>" & vbCrLf
Response.Write "<td>" & "<a href = " & chr(34) & strSourcePath & "\" & objFile.Name & chr(34) & ">" & objFile.Name & "</a>" & "</td>"
If objFSO.FileExists(strTargetPath & "\" & objFile.Name) Then
Response.Write "<td>Yes</td>"
Set objSourceFile = objFSO.GetFile(strSourcePath & "\" & objFile.Name)
Set objTargetFile = objFSO.GetFile(strTargetPath & "\" & objFile.Name)
If objSourceFile.Size = objTargetFile.Size Then
Response.Write "<td>Yes</td>"
Else
Response.Write "<td>No</td>"
End If
If objSourceFile.DateCreated = objTargetFile.DateCreated Then
Response.Write "<td>Yes</td>"
Else
Response.Write "<td>No</td>"
End If
If objSourceFile.DateLastModified = objTargetFile.DateLastModified Then
Response.Write "<td>Yes</td>"
Else
Response.Write "<td>No</td>"
End If
Set objSourceFile = Nothing
Set objTargetFile = Nothing
Else
Response.Write "<td>No</td>"
' You can add the blank <td>s if desired
Response.Write "<td> </td><td> </td><td> </td>"
' For a while I was moving files that didn't exist to the target.
' Left as comment in case anyone cares:
'objFSO.MoveFile strSourcePath & "\" & objFile.Name,
' strTargetPath & "\" & objFile.Name
End If
Response.Write vbCrLf & "</tr>" & vbCrLf
Next 'objFile
Set objSourceFolder = Nothing
Set objFSO = Nothing
%>
</table>
</body>
</html>