You can use something like
sourceFile = 'D:\SomeLocation\somefile.m;
destinationFile = 'D:\SomeOtherLocation\somefile.m;
source = File( sourceFile );
destination = File( destinationFile );
if source.lastModified >destination.lastModified
copyfile( sourceFile, destinationFile );
Note that I wrote that based on example code I have used with a few changes so it might not be 100% syntactically correct, but I did a quick test of some of the functionality before posting it.
If a file does not exist then the 'lastModified' field of java.io.File returns 0 so you can do the lastModified > test without needing to check that as the source file will always be > 0.