string get_path = textBox1.Text.Trim();
if (get_path != ""){
DirectoryInfo di = new DirectoryInfo(get_path);
FileInfo[] get_files = di.GetFiles("*.*"); // *.* = tüm ad ve tüm uzantıları kapsar
foreach (FileInfo file in get_files){
listBox1.Items.Add(file.Name);
}
}else{
MessageBox.Show("Lütfen dosya yolu belirtiniz.", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}