copy file with c# win forms
-
hi to all, i am working with c# win application. i want to copy a file from a server on the local machine. the path to my file is "http://server/Dir1/myfile.doc". before doing the copy, i need to verify if the file on the server has recent date than the file on the local machine. if yes i want to make the copy and if not i do nothing any suggestions or code sample best regards and thanks in advance fady
-
hi to all, i am working with c# win application. i want to copy a file from a server on the local machine. the path to my file is "http://server/Dir1/myfile.doc". before doing the copy, i need to verify if the file on the server has recent date than the file on the local machine. if yes i want to make the copy and if not i do nothing any suggestions or code sample best regards and thanks in advance fady
If you convert each segment of the date into a string, and check each segment in order, so: if (server.year > local.year) if (server.month > local.month) if (server.day > local.day) etc - I am not sure on the datetime conversion functions, but there will be a way to split it up into segments with normal string functions and then convert them to int32's Regards James