cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Facing issues with Folders in Flow

I am designing a flow that will remove all the document if they are 14 days old. Flow is deleting the document but getting failed everytime due to Folders. When it is reading folder Property from the last steps, does nothing for that and Failed.

Can any one help me to get rid of this error?

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @ b560934,

 

Could you please share a screenshot of the configuration of your flow?

 

 

Please take a try to add a Condition under the "Get file properties" to check if the "input" is a file or a folder,

 

You could add the expression in the Condition as below:

@contains(body('Get_file_properties')?['{FilenameWithExtension}'], '.')

If the "input" is a file, the "File name with extension" dyanmic content would contain a ".", and if the "input" is a folder, the "File name with extension" dyanmic content wouldn't contain a "."

 

I have made a test on my side and have created a flow as below:

Capture.PNG

 

The flow would get rid of this folder error and run successfully as below:

Capture.PNG

 

 

 

 

Regards,
Alice Zhang

View solution in original post

Anonymous
Not applicable

Hello Alice Zhang,

 

It worked like Charm.

I was doing something similar but i was checking if "FileName with Ext is null".

I was thinking in case of folder, File name with Ext sould be null.

Thanks so much for your help.

 

View solution in original post

2 REPLIES 2
v-yuazh-msft
Community Support
Community Support

Hi @ b560934,

 

Could you please share a screenshot of the configuration of your flow?

 

 

Please take a try to add a Condition under the "Get file properties" to check if the "input" is a file or a folder,

 

You could add the expression in the Condition as below:

@contains(body('Get_file_properties')?['{FilenameWithExtension}'], '.')

If the "input" is a file, the "File name with extension" dyanmic content would contain a ".", and if the "input" is a folder, the "File name with extension" dyanmic content wouldn't contain a "."

 

I have made a test on my side and have created a flow as below:

Capture.PNG

 

The flow would get rid of this folder error and run successfully as below:

Capture.PNG

 

 

 

 

Regards,
Alice Zhang

View solution in original post

Anonymous
Not applicable

Hello Alice Zhang,

 

It worked like Charm.

I was doing something similar but i was checking if "FileName with Ext is null".

I was thinking in case of folder, File name with Ext sould be null.

Thanks so much for your help.

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,088)