VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Path manipulation

Chris Wilson  (9 Submissions)   Files/File Controls/Input/Output   Visual Basic 3.0   Advanced   Wed 3rd February 2021

There are many methods you can use to return certain parts of a fully qualified path to a file. Here is the SHORTEST and FASTEST way to 1) return just the path, 2) return just the filename, and 3) change the extension of a filename. The code is so short that it is probably faster to keep it inline than to create additional functions. (I've done so here to better illustrate the parameters.

Assumes
I've intentionally left out doing any checks for a valid path in order to show the simplicity of the code.

Rate Path manipulation (2(2 Vote))
Path manipulation.bas

Path manipulation Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters