Thread: last slash
View Single Post
 
Old 10-31-2017, 08:45 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,218
Default

ExtractFileDir and ExtractFileName work!!!

It doesn't use any file operating calls, it's simple string slicing in code
Only problem is that you didn't specify the slash, and there was your problem

ExtractFileDir and ExtractFileName work with backslash (\) and you now use forwardslash (/). But with some thinking you should've figured this out yourself! Stop copy/paste and then shout that it doesn't work. As long as you don't specify all your requirements in your question you cannot expect a copy/paste working answer. You're a developer, there should be some pro-active code understanding from your side!!!

As for your question, that can easily be fixed by calling ExtractFileDir(UnixPathToDosPath(yourString)), and the same for ExtractFileName

#edit
And yes, you can alter your original question, but next time post it completely before there are answers that aren't what you expect
Reply With Quote