WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


File Searcher

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Xcopy only updated files?



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) 


  1. Set the searcher extender up to scan your tree.

  2. Use the FileMapName function to turn the soource name the searcher provides into the desired destination name.

  3. Use FileTimeCode to get the filetimes.

  4. Compare the filetimecodes and decide what to do.

  5. 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: 2017:07:28:13:58:30
Last Updated: 2001:02:25:13:21:45