The instr function returns a number indicating the first position of Find String in Search String (as an example, instr("ABCDE", "CD" = 3. InStrRev works the same way except it starts on the right and works its way back to the left. If the string is not found, it returns zero.
In the above, it looks for the last "\". Then the Mid$ function returns a piece of the string starting at X for Y characters. If y is not specified it returns the rest of the file. In the example above, it gets the full file name by taking everything after the last "\".
It then finds the extension by doing the same thing with the file name but taking everything past the "."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.