Hi guys, what can I use to check if there are files in the folder? No need for a specific file… I just need to know if there are files inside. Thank you.
HI @Edmundz,
For Example:
strFolderPath =“C:\Users\Arivu\Documents\UiPath”
use If Condion
Directory.GetFiles(strFolderPath).Length>0
True-> File are there in that folder
False-> Folder is empty
Regards,
Arivu
2 Likes
When you have a full path, you can also use:
Path.GetFileName(fullPath)
and Path.GetFileNameWithoutExtension(fullPath)
Both will return strings and you don’t need to create additional variables.
then use if statement to check