Can you try the below
str_Input="C:\Users\svcUpChtPreDSHS\Desktop\FakeSharedDrive\Process\CHET\11.15.2023 Nurse DONE\MF NO\Peterson.pdf"
str_Output=Path.GetDirectoryName(Path.GetDirectoryName(str_Input))
Cheers!!
Can you try the below
str_Input="C:\Users\svcUpChtPreDSHS\Desktop\FakeSharedDrive\Process\CHET\11.15.2023 Nurse DONE\MF NO\Peterson.pdf"
str_Output=Path.GetDirectoryName(Path.GetDirectoryName(str_Input))
Cheers!!