Jump to content

Recommended Posts

Posted (edited)

hi if i had something like this

D:\something\JustShow this.exe

how would i use StringSplit to just show what is after the last \ but it wont always be that long or it could be longer like.

D:\something\something\something\JustShow this.exe

i tryed to work it out but i couldnt get it to show the text after the last\ i could only do it if it was always the same amount of \

Edited by hot202
Posted

Hi, try this....

#include <array.au3>   ;only to show the array

$path="D:\something\JustShow this.exe"
$Array = stringSplit($path,"\",3)
_ArrayDisplay($Array, "StringSplit()")
msgbox(0,0,$Array[ubound($array)-1])
if you need some more parts of a path-string, theĀ 
_pathsplit()
would be an option

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...