The process cannot access the file because it is being used by another...

I have an automation script that includes two embedded automation scripts.

The first script connects to a source Excel file located on a network drive and creates an Excel file with multiple tabs, which is then saved in my local C:\temp to reduce processing time.

The second script has two Copy File activities:
The first copies the newly created file (from the above script) on my C:\temp to a network drive folder and adds a timestamp suffix to the file name.
The second should copy the original source file (from the above script) to another network location adding a timestamp suffix to the file name. Then delete the original.

My automation script fails at the second Copy File activity with the following message: “The process cannot access the file because it is being used by another process”.

Is there a way of dropping the connection to the source file used in the my first script, so I can successfully copy/move this source file to another location when finished with?

I tried adding a Pause system activity (set to 120 seconds) between my two automation scripts, but still receive the failure message.

Any help advise welcome.

Thank you in advance.

David

Can you please send me your script to igor.manokhin@quest.com? I would like to see what your script is doing exactly and then try to reproduce it in my environment.

Thanks,

Igor.