The returned file names are appended to the supplied path parameter and the order of the returned file names is not guaranteed use the Sort method if a specific sort order is required.
Insert logic for processing found files here.Ĭonsole::WriteLine( 'Processed file '', e.ToString()) For Directory::GetFiles and Directory::GetDirectories The example is configured to catch all errors common to this method. The following example demonstrates how to use the GetFiles method to return file names from a user-specified location. The specified path is not found or is invalid (for example, it is on an unmapped drive).