Tags: access, database, dates, file, files, folder, import, microsoft, mysql, names, oracle, specific, sql, table

Import File Names in Folder

On Database » Microsoft Access

1,014 words with 3 Comments; publish: Fri, 07 Dec 2007 19:15:00 GMT; (25078.13, « »)

I want to import only the file names and file dates of files in a specific folder into an MS Access table. Not the data, just the file name and file date. Anyone got any ideas how to do this?

thanks,

Winston

All Comments

Leave a comment...

  • 3 Comments
    • You need to use the FSO (File System Object) to get the filedate, and with the FSO you can also get the filename.

      Do a search on google or msdn.microsoft.com for FSO

      #1; Tue, 11 Dec 2007 20:54:00 GMT
    • An alternative is using the Dir function and the FileDateTime function. Dir is a little weird, but I think help will explain it well enough.
      #2; Tue, 11 Dec 2007 20:55:00 GMT
    • If you only need to do this once, open a DOS prompt (a "Command Window" for the younger folks), navigate to the directory and use this command:DIR *.*>FileList.txt

      This will return the directory listing, including the date and file size, into a character delimited text file, which you can then open in anything, including Excel or directly from Access if you really want to.

      I suppose it will work using the shell command as well - never tried it.

      tc

      #3; Tue, 11 Dec 2007 20:56:00 GMT