using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Collections; using System.IO; namespace ClusteringNDD { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { ArrayList fileStatistics = new ArrayList(); String datasetPath = @"D:\Data Sets\Enron"; DirectoryInfo d = new DirectoryInfo(datasetPath); FileInfo[] files = d.GetFiles("*.pdf"); MessageBox.Show(files.Length.ToString()); foreach (FileInfo file in files) { //create instance of data class fileAtt f = new fileAtt(); f.fFullName = file.FullName; f.fName = file.Name; f.FileSize = file.Length; f.fExtension = file.Extension; fileStatistics.Add(f); } } } }
foreach(String data in file) { }
foreach (FileInfo fileInfo in files) { byte[] bytes = File.ReadAllBytes(fileInfo.FullName); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)