◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── File I/O Commands ■ The following keywords are used in Visual Basic to perform file input and output: ◄ACCESS► Specifies type of access users have to a file ◄APPEND► Used in OPEN statement to set pointer to end of file ◄BINARY► Used in OPEN statement to specify binary-file mode ◄CLOSE► Ends I/O to file or device ◄EOF► Tests whether all of the data has been read from a file ◄FILEATTR► Returns information about an open file ◄FILES► Prints listing of the files in specified directory ◄FREEFILE► Returns the next valid unused file number ◄GET► Reads data from a disk file into random-access buffer ◄INPUT #► Reads data items from a file ◄INPUT$► Returns string of characters from a file ◄KILL► Deletes file from the disk ◄LINE INPUT #► Reads entire line from a sequential file ◄LOC► Gives the current position within an open file ◄LOCK...UNLOCK► Controls access to an open file ◄LOF► Gives the number of bytes in open file or output buffer ◄NAME► Changes the name of a file or directory ◄OPEN► Opens file or device for retrieving or storing records ◄OUTPUT► Used in OPEN statement to specify sequential output ◄PRINT #► Writes data to a sequential device or file ◄PUT► Writes from a variable or random-access buffer ◄RANDOM► Used in OPEN statement to specify random-access mode ◄RESET► Closes all open files ◄SEEK Function► Returns the current file position ◄SEEK Statement► Sets the position in a file for the next read or write ◄WRITE #► Writes data to a sequential file or device ◄WIDTH► Assigns output-line width to a file See: ◄Keywords by Task►