I have a file which gets download in default folder and i need to check if file exists or not.
FileName as : “Report_of_DSCL_20345234.xlsx” , Report_of_DSCL_ this value is constant and follows random number.
How can i use File Exists using wild card.?
Can you try to use GetFiles method instead of FileExists, as the following?
files = System.IO.Directory.GetFiles("Download path","Report_of_DSCL_*.xlsx")
You can use the following RegEx pattern to determine the same:
Hope this helps,
You can try with Regular Expression
Try this in if Condition
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.