Writing to text file inside an Async Action Group gives file locked error


(Thomas de Nooij) #1

We use a simple Write to Text File action to write a line to a local text file. This works fine.

As soon as we move the Write to Text File Action into an Async Action Group, it will fail with the following error:

Error writing to text file:
Cannot open file “C:\Data\Log\test.txt”. The process cannot access the file because it is being used by another process


See screenshot

We are using an older version of Automise: 4.0.0.721

Is this something that has been fixed in a later version?


(Jason Smith) #2

This should work within Automise. Running the test here works well, as there is nothing else accessing the file. Could there possibly be something on the machine that has the file open?

I have tested with 4.0.0.933


(Thomas de Nooij) #3

No nothing has the file open. If I simply move the action out of the Async group it works. But I also see that if I write to another folder (a subfolder in the same folder of the Automise project) it works. Could this be a rights issue? I am testing it on Windows 2012 R2. I will look further into it.

Regards,
Thomas


(Jason Smith) #4

Hi Thomas,

I also might be testing exactly the same thing as you. What are the setting on your Write To Text file action?