spacer
   
   
Mailtraq - the Complete Email Server
   
spacer

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

spacer
spacer

OpenFile()

Opens a text file for reading and returns a handle identifying the file which is valid until released using the CloseFile() function. Each file read operation, using the Read() function, advances a pointer to the next line in the file such that consecutive reads retrieve consecutive lines of text from the opened file. When the end of the opened file is reached, the EOF() function returns true. The same file can be opened for reading by more than one script and more than once in the same script.

handle := OpenFile( path )

path
Identifies the file to be opened by its filing system name. If no path is provided, the default location of \database is assumed
handle
An integer reference for subsequent references to the open file or nul if the file cannot be opened

Add the contents of the file input.txt to the existing contents, if any, of the file output.txt

a := OpenFile("c:\files\input.txt");
b := AppendFile("c:\files\output.txt");
While(Not(EOF(a)),
  Write(b, Read(a))
);
CloseFile(a);
CloseFile(b)
spacer


Download Trial
Buy now
Screenshots
Requirements
Feature Tree
FAQs
What's new
Print this page Print this Page
Mailtraq 2.12 PDF Datasheet
Send a friend an email about Mailtraq ShareMailtraq - Email Server at Delicious Mailtraq - Mail Server at digg Mailtraq - Mail Server at FacebookMailtraq - Email Server at stumbleupon Tweet about Mailtraq

 

 

   Copyright © 2003 - 2008 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.