VBScript cut off end of filename after space but keep extension -
i've been searching online. there way cut off space , rest of filename leave extension vbscript.
say have filename this:
filename file.txt
could vbscript cut off space , afterwards leave extension this:
filename.txt
sure, can surgery string functions available in vbscript.
dim s dim s2 s = "filename file.txt" s2 = left(s, instr(s, " ")-1) & right(s, len(s) - instrrev(s, ".") + 1) msgbox s2
Comments
Post a Comment