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

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -