cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resident Rockstar
Resident Rockstar

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 II
Super User II

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new 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!

Top Solution Authors
Top Kudoed Authors
Users online (6,962)