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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -