SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the std::filesystem to do it quite nicely:
#include <filesystem> namespace fs = std::experimental::filesystem; fs::path myFilePath("C:\\MyDirectory\\MyFile.bat"); fs::path filename = myFilePath.stem();