Advertisement
metalx1000

basename

Jun 13th, 2014
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2. Get's the base file name of a file
  3. #>
  4. $url = "http://test.com/folder/file.png"
  5. Write-Host "The URL is $url"
  6. $base = [io.path]::GetFileNameWithoutExtension("$url")
  7. Write-Host "The Base File Name is $base"
  8. $file = [io.path]::GetFileName("$url")
  9. Write-Host "The File Names is $file"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement