VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc.

by WaveKing (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 5th September 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc.

Rate Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc.



'fname is the name of the file e.g. letter.doc
'then fpath will have just 'c:\my documents\'
'this will only work in cases where u know the filename too ! like in the case 'of a commondialog box

dim fpath as string
fpath = Replace(yourpath, fname, "")

Download this snippet    Add to My Saved Code

Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc. Comments

No comments have been posted about Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc.. Why not be the first to post a comment about Get the path from a full pathname+filename, with one simple 1 line function. no declarations etc..

Post your comment

Subject:
Message:
0/1000 characters