1.

Solve : Compare file date-stamps in a batch file?

Answer»

I have an Excel application with which the user runs a batch file that copies a template from a server to their local drive and then opens the file. I would LIKE to add funtionality that would CHECK the file on the server vs. local disk and if there was no change I would skip the copy function.

Any suggestions would be appreciated.

Thanks,
Joseph [smiley=vrolijk_1.gif]The XCOPY command has that functionality built-in. You can compare the timestamps MANUALLY if you want, but I would use XCOPY to do the work like this:
Code: [Select]xcopy \\Server\Share\Template.xls C:\Local\Path\ /D /YThat should copy the Template.xls file to C:\Local\Path\Template.xls, but only if the network version is newer (or the local copy does not yet exist).Perfect! (and simple)

Thank you,
Joseph [smiley=grin.gif]



Discussion

No Comment Found