question

Pushkins-9024 avatar image
0 Votes"
Pushkins-9024 asked Pushkins-9024 commented

GetFileName

Hi

I have a problem with GetFileName when getting directory names. If the directory name contains a dot as in Mydir.ectory all I get is Mydir.

If there is no dot as in Mydirectory then it works and I get Mydirectory.

I am guessing it has something to do with extensions. How can I avoid this and get the full directory name even if it contains a dot.

Thank you

c++
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Post a relevant code snippet.

0 Votes 0 ·

Hi

I have managed to achieve what I was trying to do using a combination of GetFileName, GetFilePath and CString::ReverseFind

Now it works perfectly

Thanks you so much for all your help

0 Votes 0 ·
Viorel-1 avatar image Viorel-1 Pushkins-9024 ·

Does it work perfectly if the name contains two dots?


0 Votes 0 ·

Hi

Yes it does.

Thanks

0 Votes 0 ·

0 Answers