Generic File Handling Functions

Category:
Files and Directories
Type:
Modules
Difficulty:
Intermediate
Author:
Anne-Lise Pasch

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This is a .bas module that includes the following functions:
  • File Attributes - Returns attributes of files
  • File Created - Date the file was created
  • FileExists - Returns true if the file exists
  • FileLastModified - Date the file was last modified
  • FileLastAccessed - Date the file was last accessed
  • ReadFromFile - Returns the file's contents
  • ShortPath - The File's Short (8.3) path
All functions use the API and none use the FileSystemObject. This ensures maximum performance and compatibility with older versions of VB.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download filefunctions.zip