How to Xcopy only updated files?
Keywords:
Question:
I have downloaded the searcher extenders, and have examined the xcopy.wbt example,
however, how would I duplicate directories (ie. \temp to \tempb)based on updated files?(
ie. if \temp and subdirectories have newer files--based on date, then filecopy them.
otherwise do not copy.
I know that filecompare will tell me the date info, but I don't know how to filecompare
all files, and it would be tough to specify every individual file and folders line by line.
The dos xcopy equivlant would be:
xcopy c:\temp c:\btemp /s /e /D (date)
Answer:
- Set the searcher extender up to scan your tree.
- Use the FileMapName function to turn the soource name the searcher provides into the
desired destination name.
- Use FileTimeCode to get the filetimes.
- Compare the filetimecodes and decide what to do.
- FileCompare is not a good idea as if the files have the same size, it will then do a byte
by byre compare of the files.
Article ID: W12564
Filename: Xcopy Only Newer Files.txt
File Created: 2001:02:25:13:21:46
Last Updated: 2001:02:25:13:21:46