Parsing File Paths from Access Tables
Hi! I need a bit of help parsing file names in VBA. I would rather use Instr rather than regular expressions. Thank you in advance for any advice you may be able to offer.
If a file name begins with a numeric, there would be no prefix <NULL>, and if a file name has no numerics, the entire file name would be the prefix and the suffix would be <NULL>. Extension should be truncated.
- The source data is in the "Files" table
- Result should display Files from the Files table, plus FolderPath (without file name) and FileName (without file path) for all files
- For those files where the filename has both letters and numbers, there should also be two other fields: Prefix (introductory letters before the first number) and Suffix (following number/letter combination)
Sample output:
Files
FolderPath
FileName
Prefix
Suffix
C:\WINDOWS\Help\AGT0406.HLP
C:\WINDOWS\Help\
AGT0406.HLP
AGT
0406
C:\WINDOWS\Help\iisHelp\common\400.htm
C:\WINDOWS\Help\iisHelp\common\
400.htm
400
C:\WINDOWS\Help\masked98.chi
C:\WINDOWS\Help\
masked98.chi
masked
98
C:\WINDOWS\Help\ACCESS.HLP
C:\WINDOWS\Help\
ACCESS.HLP
ACCESS