ghudson
Registered User.
- Local time
- Today, 06:21
- Joined
- Jun 8, 2002
- Messages
- 6,193
I need some help extracting out the main directory name from a string that contains the full path name and file name. Using the Mid and Instr functions are giving me a headache for I can not get just the main directory name.
Here is how the strings will look in the FilePathName field of my tblFiles table...
L:\Data\Subs\test.xls
X:\Files\Testing\123\one.txt
C:\My Documents\Access\DBs\Division.mdb
And I need to update the DirectoryName field in the tblFiles table with just the main directory name like this for those records...
Data
Files
My Documents
Any suggestions on how I can do this? Thanks in advance for your help!
Here is how the strings will look in the FilePathName field of my tblFiles table...
L:\Data\Subs\test.xls
X:\Files\Testing\123\one.txt
C:\My Documents\Access\DBs\Division.mdb
And I need to update the DirectoryName field in the tblFiles table with just the main directory name like this for those records...
Data
Files
My Documents
Any suggestions on how I can do this? Thanks in advance for your help!