Get only filename from full path of a file

Question:

I want to split the path and just save the file name test.xls in a new variable

Answer:

Recommend using the built-in Split-Path:

Source:

Get only filename from full path of a file by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply