How to get parent folder name?
发布时间:2026-08-19 | 浏览:1
Access to this page requires authorization. You can try signing in or changing directories .
Access to this page requires authorization. You can try changing directories .
Thursday, May 4, 2017 3:41 PM
I want to get folder name of different file locations
\mydocuments\testfiles\1.doc - then folder name should return as testfiles
\mydocuments\testfiles\subfolder\1.doc - then folder name should return as testfiles\subfolder
\cached\mydocuments\finance\subfolder\1.doc - then folder name should return as finance\subfolder
c:\scripts\bin\albe.exe then it should return scripts\bin
c:\users\login\appdata\local\logs\mylogs.txt it folder name should return as users\login\appdata\local\logs
How can I achieve this?
All replies (3)
Thursday, May 4, 2017 3:50 PM
help split-path -full
Thursday, May 4, 2017 4:14 PM
I tried following one basic example, it seems to I Need to understand Split-Path and test with different switches.
Thursday, May 4, 2017 4:31 PM
Additional resources
Last updated on 2017-05-04