Question

"The Process cannot access the file because it is being used" Error

  • 16 October 2023
  • 2 replies
  • 275 views

Badge

Hi All,

 

From about 8 - 10 days, My team started experiencing the "The Process cannot access the file because it is being used" Error. Bots used to work for months without issue suddenly began failing on this exact action for Excel or CSV files.

 

We are getting this randomly across different bots. The file is not being used by any other bots or users. The path is also not being used by anybody else.

 

Looking forward to your immediate help. 


2 replies

Userlevel 6
Badge +15

Hi @PAVAN 5380 ,

 

Please find the below 

 

Bots used to work for months without issue suddenly began failing on this exact action for Excel or CSV files - Might the related packages ar upgraded, Kindly verify the packages.

 

We are getting this randomly across different bots. The file is not being used by any other bots or users. The path is also not being used by anybody else

Previous execution sessions are not closed yet, that might caused the issue. 

 

As Best Practice, 

After you have automated the CSV/TXT-related tasks, close the file using the Close action. Enter the session name that was used to open the file with the Open action

 

 

 

 

 
Userlevel 3
Badge +8

Hi @PAVAN 5380,

  1. Verify that no security applications are accessing the file while the bot is running.
  2. Review the bot's logic to confirm that it correctly terminates file sessions before invoking the same file under a different action.

Hope this helps!

Reply