Remove one directory from full directory path

前端 未结 2 1377
鱼传尺愫
鱼传尺愫 2021-01-17 09:51

I have a directory path of C:\\Subdir1\\Subdir2\\Subdir3\\filename.xml.

I need to first check if the file, filename.xml exists in the root

相关标签:
2条回答
  • 2021-01-17 10:19
    Directory.GetParent(dir).FullName
    
    0 讨论(0)
  • 2021-01-17 10:23

    Try this one Directory.GetParent and System.IO.File.Exists

    0 讨论(0)
提交回复
热议问题