string 의 경로명으로
해당 경로의 파일을 가져오는 예제입니다.
System.IO.Directory 가 사용됩니다.
전체 소스
소스 일부
private void btnRead_Click(object sender, EventArgs e)
{
if(System.IO.Directory.Exists(txtPath.Text))
{
txtList.Text = “”;
foreach (string s in System.IO.Directory.GetFiles(txtPath.Text))
{
txtList.Text +=s+”rn” ;
}
}
}