Archive: Strip filename


Strip filename
  Im sure this has been answered but I cant find it, I have the selectFile dialog box return
the path and filename of what file was selected as $varSelectedFile
example c:\blah\blah\yak.exe
I found a function that strips that down to just the filename but I also need one that gives me just the path with no filename from that if anyone can help me out

Thanks :)

EDIT: would also like to get the file name minus the extention as a var too



SectionEnd 

>
See chapter "E.1 File Functions Header" of the NSIS documentation (help file) for details.

Thank you sir :)


Need more help please ,it appears the Charstrip does not work if the text contains _ underscores is there somthing I can do
so I have text that will always contain underscores like d_bgchk_Pasomthing_somthing.exe
and in this case I want to strip off d_bgchk_ and get the rest back

${CharStrip} "d_bgchk_" "$1" $R0
$1 would be the file name and this does not work however
${CharStrip} "d" "$1" $R0
strips the d off $1 so its anything after _

Thanks again
EDIT: nevermind should have used StrStrip lol