Decarlo110 wrote:
There is no built-in variable for that, but you could use:
Code:
StringTrimRight, var_trimmed, A_LoopFileFullPath, 4
Test...
Code:
A_LoopFileFullPath=C:\filename.htm
var_trimmed=C:\filename
...good, ok...
Code:
A_LoopFileFullPath=C:\filename.html
var_trimmed=C:\filename.
...Danger Will Robinson!...an extra dot. It gets worse if the extension is longer. That's why I
suggested SplitPath in the other thread...
Code:
SplitPath, A_LoopFileName, , , , A_LoopFileNameNoExt
...ok, so I didn't *test* either version, but I pretty much know that StringTrimRight is really only gonna remove 4 chars, leaving the dot in the 2nd example...I am also pretty sure Chris wrote SplitPath so it works with all extensions.
_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)