Mc Culloch
Board Regular
- Joined
- Jul 21, 2005
- Messages
- 68
Got a problem that I can't work out how to do using the regular TEXT functions.
I have a text string which represents a files path name [returned using "Application.GetOpenFileName()"]. For example,
C:\WorkFiles\2005_06\Nov\Reports.xls
I need to be able to trim off the file name, leaving the full path down to the folder. The example above would be as follows,
C:\WorkFiles\2005_06\Nov\
The logic I was thinking of wouyld be to trim off all the chars from right to left until you reach the first \ but I can't get my head round how you would do that using the standard functions.
Any ideas gratefully received!
I have a text string which represents a files path name [returned using "Application.GetOpenFileName()"]. For example,
C:\WorkFiles\2005_06\Nov\Reports.xls
I need to be able to trim off the file name, leaving the full path down to the folder. The example above would be as follows,
C:\WorkFiles\2005_06\Nov\
The logic I was thinking of wouyld be to trim off all the chars from right to left until you reach the first \ but I can't get my head round how you would do that using the standard functions.
Any ideas gratefully received!