Comparing 2 files of the same name to find the latest

Havooma 156 Reputation points

So Im sure this is an easy one. I have 2 files in different directories which are the same name. One is the 'source', the other is the 'destination' directory.

I am writing some code to look at whether there has been any change to the source and if so, I can then copy it to the destination. Just wondered what the best way is to compare the files. Would be keen to make sure I dont copy those that are have the same time/date!

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,872 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. Kamarge Priyankara 1 Reputation point

    Yes, comparing the source and the destination timestamps are the best and the easiest way to identify any changes take plce

    0 comments No comments