에서 파일 이름을 얻을 수 있습니다 :어떻게이 문자열에서 파일 이름을 얻을 수있는 방법이 문자열
"C:\\Users\\Public\\Pictures\\Sample Pictures\\Lighthouse.jpg"
예를 들어, 내 결과는 다음과 같아야합니다 : "Lighthouse.jpg"
.
using System.IO;
// ...
var filePath = "C:\\Users\\Public\\Pictures\\Sample Pictures\\Lighthouse.jpg";
var fileName = Path.GetFileName(filePath);
구글이 아래로 오늘 또는 뭔가 :
– John3136[문자열에서 파일 이름 가져 오기] 가능한 중복 (http://stackoverflow.com/questions/2742688/getting-file-name-from-the-string) –