Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== InitDir statement ====== ==== Description ==== Prepares for the DirList function, by establishing the default directory and file mask. ==== Syntax ==== **InitDir** //expression// ==== Parameters ==== The InitDir statement has the following parameters. ^Parameter^Description^ |//expression//|Defines the directory path to the files and specifies the type of files that are to be returned.| \\ **Note:** InitDir may take the operating system wild cards "*" and "?".| ==== See Also ==== For more information about directory listings and pathnames, refer to your operating system manual. Also, [[dirlist|DirList()]], [[setinitdiroptions|SetInitDirOptions]] ==== Example ==== The following example illustrates how to get a directory listing. <code> /* The program gets the list of all *.DOC files in the C:\HISTORY\DOCS\LETTERS directory into list variable. It uses InitDir to indicate the directory and DirList() to return the filenames. Note the use of @FM and Col2() within the brackets. */ drive="C:\HISTORY\DOCS\LETTERS" InitDir drive : "*.DOC" loop list = DirList() Until List = "" loop line = list[1,@FM] list[1,Col2()] = "" Until list = "" repeat repeat end </code> guides/programming/programmers_reference_manual/initdir.txt Last modified: 2024/06/19 20:20by 127.0.0.1