# CString Replace

Hi guys,

I have a CString, which contains the following:

"C:\folder\folder\/folder/file.doc"

As you noticed, there is a: "\/" in the folder path, I need to do a find and replace for "/" and replace with "\"

Could somebody help me out please?

Cheers!
LVL 4
###### Who is Participating?

Commented:
CString foo = "C:\\folder\\folder\\/folder/file.doc";

foo.Replace('/', '\\');      // convert / to \
foo.Replace("\\\\", "\\");// convert any \\ to \
0

Author Commented:
Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.