Thanks Richard. I'm glad to hear that. I thought that was the case but I wasn't sure and my Google searching didn't give me any answer.
MikeAngel
Posts
-
Linux clients and ASP .NET on a Windows Server -
Linux clients and ASP .NET on a Windows ServerCan a Linux client machine use an ASP .NET app residing on a Windows server?
-
File write times in .NET local drive vs. NAS driveWhen I compensate for the differences in the storage devices by converting the last write date/time results to concatenated strings containing Year, Month, Day, Hour, and Second, the comparison works properly. With this approach I'm assuming that going to the second is accurate enough. You may want to use the same approach with yours. Thanks for the explanation. Here is my code:
Dim SourceWriteTime As DateTime = CDate(File.GetLastWriteTimeUtc(SourceFileName))
With SourceWriteTime
Test1 = .Year & "/" & .Month & "/" & .Day & "/" & .Hour & "/" & .Minute & "/" & .Second
End WithDim BackupWriteTime As DateTime = CDate(File.GetLastWriteTimeUtc(BackupFileName))
With BackupWriteTime
Test2 = .Year & "/" & .Month & "/" & .Day & "/" & .Hour & "/" & .Minute & "/" & .Second
End With
Dim SourceHasLaterDate As Int16 = Test1.CompareTo(Test2)If the SourceHasLaterDate > zero, I backup the file.
-
File write times in .NET local drive vs. NAS driveHi, I'm trying do write a backup program in VB .NET. It needs to avoid backing up files that have already been backed up and so it compares the last write times of the source and backup files. If they are the same, the backup for the file is not performed. If both the source file the backup file are on the local hard drive, the comparisons work correctly. If both the source file the backup file are on a Network Attached Storage drive, the comparisons work correctly. But if the source file is on the local hard drive and the backup file is on the Network Attached Storage drive, the comparison always says the they are different no matter what. Code: (I'm using the CompareTo method.) Dim SourceHasLaterDate As Int16 = SourceWriteTime.CompareTo(BackupWriteTime) Is there any way I can get an accurate result for the third condition? Thanks, Mike PS: I'm modifying the backup program written by Taner Riffit.
-
Calling functions from EventsI agree with you. But what does GetSccmFolders() mean? In other words, is it a good example of self-documenting code?
-
Calling functions from EventsRegarding comments: It is best to summarize right at the beginning of a method what it is supposed to do. You then write the code in a clear and self-commenting manner that makes it easy for you and other programmers to see how it is being done. So if it turns out that there are times when the result of the method is inconsistent with the summary, it is easier to debug. The other benefit of doing it this way is that the developer has given thought to the method's objective before actually writing the code that does it.
-
Calling functions from EventsAmen!!!