How to avoid downloading folders using Download from one drive

I just need to download one single excel file present in onedrive.
But there is a folder also which I have to avoid but while downloading the file it is giving me the error .
Can anyone please suggest how to avoid downloading the folder.

Download File: Folders cannot be downloaded with this activity. Please input a different DriveItem.

Above mentioned error I am getting.
Can anyone help to avoid downloading the folder and just download the excel file.

Hi @Kunal_Jain

Please use the property driveitem1.Folder.ToString to check if it is a folder or file

This value will be empty if it is file …for folder you will have a value here

cheers

How should I avoid the folder and just download the file??

Microsoft.Graph.Folder
I am getting this output
That means folder is present there

Hi @Kunal_Jain

I hope youa re using find files activity . In that from the output of list of drive items …use a loop and check with if condition if it is folder or not. If its file only then download

Or Alternately use for each file/Folder with the property as below

cheers

Hi @Kunal_Jain

You can get the name and check if it contains a extension or not. If it contains extension it is a file else a folder
driveitem1.Name

Or as mentioned above use for each with the file property set

cheers