You can do a directory list with a pattern to check for files
string[] files = System.IO.Directory.GetFiles(path, "*_peach.xml", System.IO.SearchOption.TopDirectoryOnly);
if (files.Length > 0)
{
//file exist
}
More Related Contents:
- Sorting Win Form CheckListbox [closed]
- How do I get and set Environment variables in C#?
- How to create a simple proxy in C#?
- Workaround for lack of ‘nameof’ operator in C# for type-safe databinding?
- Editing dictionary values in a foreach loop
- How to call a VBScript file in a C# application?
- Is there an alternative to string.Replace that is case-insensitive?
- Convert bitmaps to one multipage TIFF image in .NET 2.0
- Casting List – covariance/contravariance problem
- Best method to obfuscate or secure .Net assemblies [closed]
- Watermark in System.Windows.Forms.TextBox
- Compare two Lists for differences
- XmlSerializer – There was an error reflecting type
- DataTable to JSON [duplicate]
- Difference between the System.Array.CopyTo() and System.Array.Clone()
- End of Stream encountered before parsing was completed?
- Can I use extension methods and LINQ in .NET 2.0 or 3.0?
- Control.AddRange(…) is slow
- How to get xpath from an XmlNode instance
- How to unit test if my object is really serializable?
- How do I prevent print screen
- Return DataReader from DataLayer in Using statement
- How does the “Using” statement translate from C# to VB?
- what’s the use of string.Clone()?
- How to migrate a .NET Windows Service application to Linux using mono?
- Regex.Match whole words
- Debug vs. release in .NET
- Why am I getting this error:”Cross-thread operation not valid: Control lbFolders accessed from a thread other than the thread it was created on.”?
- Show controls added programmatically in WinForms app in Design view?
- Run shell commands using C# and get the info into string [duplicate]