获取路径最后一个目录名称

XPStyle on
OutFile "Test.EXE"
Name "Test"
Section "Test"
Push "D:Program FilesTencentQQ"
Push ""
Call GetAfterChar
Pop $R0
MessageBox MB_OK $R0
SectionEnd
Function GetAfterChar
 Exch $0
 Exch
 Exch $1
 Push $2
 Push $3
 StrCpy $2 0
 loop:
 IntOp $2 $2 - 1
 StrCpy $3 $1 1 $2
 StrCmp $3 "" 0 +3
 StrCpy $0 ""
 Goto exit2
 StrCmp $3 $0 exit1
 Goto loop
 exit1:
 IntOp $2 $2 + 1
 StrCpy $0 $1 "" $2
 exit2:
 Pop $3
 Pop $2
 Pop $1
 Exch $0
FunctionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容