Friday, April 03, 2009

Nice little VBScript trick

To go from a path like this
D:\_pdf\a\b\c\foo.bar

to a path like this
D:\a\b\c\foo.bar

you can do this
sFile = "D:\_pdf\a\b\c\foo.bar"
sResult = Join(Split(sFile, "_pdf\",-1,1),"")

I just thought I'd share.