cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

File System Actions - information for locked files?

I have learned that I am unable to perform a Delete File action when it is open.  Unfortunately, this is a shared drive, and I have no way to police who has files open in this directory.  I have been looking, but have not found anything in the metadata actions that would tell me if the file is locked nor by whom.  I would like to test this first, and trigger a notification to the user to close the file.  

 

I know that I can Configure Run After to do things on the failure of the delete, which I will do at a minimum, but I would like to have the user info so I can know who to harass to have them close the file.  

 

Any ideas?

 

Thank you.

1 REPLY 1
Highlighted
Super User
Super User

Re: File System Actions - information for locked files?

I can't think of any easy way to accomplish this, other than capturing when a delete fails in something like a SharePoint list for reviewing later.

You could create a SharePoint list from the failures then utilize a Scheduled Task to run the force-close script against the list - but that would operate outside of Flow (Close-SmbOpenFile).

The File System operations for the Gateway Connector has pretty limited actions, triggers and definitions. You're basically limited by the BlobMetadata definition, which has a LastModified, but not a modified or opened by. 

If this is functionality you would like to see added to Flow, please consider submitting it to the Flow Ideas page, where it can be voted on by other users, and tracked and commented on by the Flow team.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,996)