Check if file is occupied

I would like to know if there is a way to know if a file (Excel, for example) in a shared folder is occupied by a user or another robot before trying to edit it.

The main idea is that if the file is occupied, the robot will wait until is available to edit it.

Hi @pzampella2,
Use try catch activity

file.Open(FileMode.Open, FileAccess.Read, FileShare.None)

if you get any exception file is in already using by another process.

Check this link ,



This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.