경로

    전체 경로를 받아 파일명 또는 폴더명만 얻기

    ' 전체경로명에서 파일이름만 구한다. Public Function ExtractFileName(ByVal strpath As String) As String strpath = StrReverse(strpath) If InStr(strpath, "\") > 0 Then strpath = Left(strpath, InStr(strpath, "\") - 1) End If ExtractFileName = StrReverse(strpath) End Function ' 전체경로명에서 경로명만 구한다. Public Function ExtractDir(ByVal strpath As String) As String Dim n n = Len(ExtractFileName(strpath)) ExtractDir = strpat..

    전체경로를 받아 파일이름을 제외한 경로만 구하기

    //-------------------------------------------------------------------------------------// // Function : OnlyDirecory // Parameter : CString strMoney // Return : LPTSTR strFull // Note : 인자로 받은 전체파일이름의 파일이 있는 경로를 리턴한다. //-------------------------------------------------------------------------------------// LPTSTR OnlyDirecory(LPTSTR strFull) { TCHAR* pPos = strFull + strlen( strFull ); while ( s..