Make use of shadow copies (Volume Shadow Service/VSS) to safely copy locked files
Using VSS enables the copying of locked files, and decreases the likelihood of corrupt files in the event that other applications open/move/change files at some point during a file copying process.