File opening, closing file, edit file, writing file, deleting file, reading file.
Using OPEN statement a VB program always has to open a file before the program can read or write data to the file. The OPEN statement before verious task.
- Locating a file.
- Making shore the file exists.
- Create some folder & entries the manage the fide way the file is open.
OPEN Str File Name [formed] As [#] int File number
Str FILE NAME
A string value or string variable that hold the file name.
Determines how VB open/user the file. Three types of modes.
Int FILE NUMBER
Value represent a number from 1 to 225 Associated with a file when the file open & released at the time of file.
USE OF FREE FILE
- Built-Inn function.
- Accepts no arguments.
- Returns next available file number value.
- Int file number = Free file ().
Close statement perform opposite jobs from it closes the file by writing any final data to the file. Relasing the file to other application & given the file number back to application.
CLOSE [[#][int File Number], [#] [int File number]….]
Close1 (File number 1) or
Close3 (File number 3)
KILL command is used to delet one or more files.