Ara :
HOME
ASP
PHP
JAVASCRIPT
C#
Add Code
Turkish
ASP Code Samples
PHP Code Samples
JavaScript Code Samples
C# Code Samples
C# Code Sample
C# Delete all files
These examples show how to delete all files (*.*) from a folder in C#.
using System.IO; string[] filePaths = Directory.GetFiles(@"c:\MyDir\"); foreach (string filePath in filePaths) File.Delete(filePath);
First, geting the list of file names from the specified directory (using static method Directory.GetÂFiles). Then delete all files from the list.
Added By : Administrator
Back to C# Code Samples
email :
info@kodornekleri.com