in reply to Copy files and subdirectories

but Xcopy does not have a way to exclude ... I need it to look for files such as ".lck" files and not copy them

Hm. According to the documentation:

/EXCLUDE:file1[+file2][+file3]... Specifies a list of files containing strings. Each stri +ng should be in a separate line in the files. When any of +the strings match any part of the absolute path of the file +to be copied, that file will be excluded from being copied. F +or example, specifying a string like \obj\ or >>>.obj<<< wi +ll exclude all files underneath the directory obj or >>>all files w +ith the .obj extension<<< respectively.

suggests that you've misread the documentation and that:

"xcopy /E /I /F /R /exclude:.lck <source> <destination>"

should do exactly what you are asking for.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.