I create a File Copy job to take an application directory that also contains the database needed for the application to function. I have a separate script that runs before to backup the database to a flat file that would be picked up by the copy of the whole data directory. With that, in this directory there are many flat files that I would like to have copied to another host for quick access should something happen to the application server and the File Copy process seems like it could be the right tool. However it is missing some basic file controls for a copy process to function. I cannot move the database as it is hardcoded and needs to be where all the supporting files are located. I opened a case initially thinking that maybe I was missing something, "[ID# 01695015] File Copy fails due to open files" is there for your reference, as they pointed me to make my request to this forum.
Below is the log-snip from the job I tried today:
2/19/2016 12:46:07 PM :: Failed to get file '\\?\C:\Data\XXXX\XXmage\MSDE\MSSQL$XXXXX\Data\master.mdf'
The process cannot access the file because it is being used by another process.
Failed to open file [\\?\C:\Data\XXXX\XXmage\MSDE\MSSQL$XXXXX\Data\master.mdf] in readonly mode.
Failed to open file [\\?\C:\Data\XXXX\XXmage\MSDE\MSSQL$XXXXX\Data\master.mdf] for reading.
read: End of file
The process cannot access the file because it is being used by another process. Can the File Copy job be enhanced to include the following; ability to set options to skip open files, skip on failed copy (or other errors), retry attempts for failed transfers, copy new, overwrite newer, only copy new or changed files, or other advanced copy features you might find in tools like robocopy or xcopy.
i having similar problem with you. i created a file copy job and it cannot completed due to same error as yours.
"Failed to get file '\\?\G:\Shared\2017\~$Provision 2017.xlsx' The process cannot access the file because it is being used by another process. Failed to open file [\\?\G:\Shared\2017\~$Provision.xlsx] in readonly mode. Failed to open file [\\?\G:\Shared\2017\~$Provisio"