I'm trying to get filename (directory) of file and make its subdirectory. But if my file's extension is .exe I would like to delete 8 characters to fully delete "test.exe" text in installer and then join //test (_tcscat(installer, _T("\\test"));) Is it possible. Maybe it's possible to get folder name of that path without filename?