N
N
NewDevLab2020-04-05 21:44:13
PowerShell
NewDevLab, 2020-04-05 21:44:13

Get the last folder on the path?

I'm stupid.
There is a path: C:\test1\test2\test3
How to get the string test3?
Get the parent and get it out of the way. Need more beautiful.
I don’t see the necessary arguments, for example, for split-path.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2020-04-05
@NewDevLab

but somehow i see it :)
Split-Path C:\test1\test2\test3 -Leaf

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question