Posts

Showing posts from September, 2013

VBScript to compare different file types

'Comparing Text, XML, and HTML files 'Close all open Notepad files Call CloseAllNotepadFiles () ''Close all open HTML pages 'Call CloseAllHTMLDocuments() 'Get the path of current directory FilePath = CreateObject ( "Scripting.FileSystemObject" ). GetAbsolutePathName ( "." ) 'Get files to comapare f1 = FilePath & "\files\File1.txt" f2 = FilePath & "\files\File2.txt" ''Get files to comapare 'File1 = FilePath &"\files\File1.xml" 'File2 = FilePath &"\files\File2. xml " ''Get files to comapare 'File1 = FilePath &"\files\File1.html" 'File2 = FilePath &"\files\File2.html" 'Call CompareFiles function Call Comparefiles ( f1 , f2 ) If CompareFiles ( f1 , f2 ) = False Then     MsgBox "Files are identical." Else     MsgBox "Files are different."...