Look at the documentation for
wcscmp()
[
^]; your code will never work because you are comparing a full path with a single character. You would be better using something like
wcschr()
[
^] to find the separator characters, or
wcstok_s()
[
^] to split your path into its constituent parts.