Quantcast
Viewing all articles
Browse latest Browse all 21975

Split file path and remove forst 10 characters

IS there a way to remove the first part of the URL as follows:

$url = "c:\scripts\test"

So that I just have "test" ?

I've tried replace and also split but nothign seems to work.  So far I have

$newtoplevel = "c:\archive\"
$getDir = get-childitem -recurse -path c:\scripts | ?{ $_.PSIsContainer }
$newtoplevel.count

foreach ($folder in $getdir){
$folder.fullname

#I need t split here and work with the result

}


Alter De Ruine



Viewing all articles
Browse latest Browse all 21975

Trending Articles