Import files name to table - name,extension,creation date

Magnus1982

Registered User.
Local time
Today, 03:05
Joined
Apr 29, 2017
Messages
41
Hello,


I am lookinh way to import filename from directory in to access tabel. But I want to have imported to 3 sapereate column in tabel file name , extension, creation date.


I found many codes which doing that but all copying file name to one column .


Please help.


Thank you
 
To parse the file names, you will need to use the Left(), Mid(), and Right() functions.
 
I didn't see any FSO property that separates the file name from the extension. Perhaps you could point it out.
 
Here are some FSO functions that process filenames. The first two, GetBaseName and GetExtensionName will both separate the filename from the extension.
Code:
Sub Test928346912487()
    Const TMP = "C:\Folder\File.txt"
    
    With CreateObject("Scripting.FileSystemObject")
        Debug.Print .GetBaseName(TMP)
        Debug.Print .GetExtensionName(TMP)
        Debug.Print .GetFileName(TMP)
        Debug.Print .GetDriveName(TMP)
        Debug.Print .GetParentFolderName(TMP)
    End With
End Sub
Mark
 

Users who are viewing this thread

Back
Top Bottom