Difference between revisions of "ScriptBasic:UsersGuide 12.14"

From ScriptBasic
Jump to: navigation, search
(New page: [Contents]<br /> :12. File Handling<br /> =12.14. Listing files= [<<<] [[ScriptBasic:UsersGuide_...)
 
 
Line 6: Line 6:
 
[[ScriptBasic:UsersGuide_12.13|[<<<]]] [[ScriptBasic:UsersGuide_12.14.1|[>>>]]]
 
[[ScriptBasic:UsersGuide_12.13|[<<<]]] [[ScriptBasic:UsersGuide_12.14.1|[>>>]]]
  
:[[ScriptBasic:UsersGuide_12.14.1|12.14.1. Open directory]]<br />:[[ScriptBasic:UsersGuide_12.14.2|12.14.2. Function NextFile]]<br />:[[ScriptBasic:UsersGuide_12.14.3|12.14.3. Function EOD]]<br />:[[ScriptBasic:UsersGuide_12.14.4|12.14.4. Reset directory]]<br />:[[ScriptBasic:UsersGuide_12.14.5|12.14.5. Close directory]]<br />
+
:[[ScriptBasic:UsersGuide_12.14.1|12.14.1. Open directory]]<br />
 +
:[[ScriptBasic:UsersGuide_12.14.2|12.14.2. Function NextFile]]<br />
 +
:[[ScriptBasic:UsersGuide_12.14.3|12.14.3. Function EOD]]<br />
 +
:[[ScriptBasic:UsersGuide_12.14.4|12.14.4. Reset directory]]<br />
 +
:[[ScriptBasic:UsersGuide_12.14.5|12.14.5. Close directory]]<br />
 
----
 
----
 
Up to know we have discussed instructions and operations that were dealing with files. To access a file you needed to know the name of the file. Many times the program does not know the file and needs to get the list of all files in a certain directory. To do this you can use the commands <font size="3"><tt>OPEN DIRECTORY</tt></font>, <font size="3"><tt>CLOSE DIRECTORY</tt></font> and the function <font size="3"><tt>NextFile</tt></font>.The command <font size="3"><tt>OPEN DIRECTORY</tt></font> opens a directory for getting the list of the file. The command reads the list of the files and creates an internal list of the files.The function <font size="3"><tt>NextFile</tt></font> can be used to retrieve the files of the directory opened one by one. When the last file name has been retrieved or when there is no need to retrieve the remaining file names the command <font size="3"><tt>CLOSE DIRECTORY</tt></font> should be used to close the listing.
 
Up to know we have discussed instructions and operations that were dealing with files. To access a file you needed to know the name of the file. Many times the program does not know the file and needs to get the list of all files in a certain directory. To do this you can use the commands <font size="3"><tt>OPEN DIRECTORY</tt></font>, <font size="3"><tt>CLOSE DIRECTORY</tt></font> and the function <font size="3"><tt>NextFile</tt></font>.The command <font size="3"><tt>OPEN DIRECTORY</tt></font> opens a directory for getting the list of the file. The command reads the list of the files and creates an internal list of the files.The function <font size="3"><tt>NextFile</tt></font> can be used to retrieve the files of the directory opened one by one. When the last file name has been retrieved or when there is no need to retrieve the remaining file names the command <font size="3"><tt>CLOSE DIRECTORY</tt></font> should be used to close the listing.
 
----
 
----
 
[[ScriptBasic:UsersGuide_12.13|[<<<]]] [[ScriptBasic:UsersGuide_12.14.1|[>>>]]]
 
[[ScriptBasic:UsersGuide_12.13|[<<<]]] [[ScriptBasic:UsersGuide_12.14.1|[>>>]]]

Latest revision as of 23:50, 27 December 2007

[Contents]

12. File Handling

12.14. Listing files

[<<<] [>>>]

12.14.1. Open directory
12.14.2. Function NextFile
12.14.3. Function EOD
12.14.4. Reset directory
12.14.5. Close directory

Up to know we have discussed instructions and operations that were dealing with files. To access a file you needed to know the name of the file. Many times the program does not know the file and needs to get the list of all files in a certain directory. To do this you can use the commands OPEN DIRECTORY, CLOSE DIRECTORY and the function NextFile.The command OPEN DIRECTORY opens a directory for getting the list of the file. The command reads the list of the files and creates an internal list of the files.The function NextFile can be used to retrieve the files of the directory opened one by one. When the last file name has been retrieved or when there is no need to retrieve the remaining file names the command CLOSE DIRECTORY should be used to close the listing.


[<<<] [>>>]