Xbasic

DIR_PUT Function

Syntax

C DIR_PUT(C directory_name)

Arguments

directory_name

The fully qualified name (which should include the full path and an optional drive specification) of the directory to make current.

Description

DIR_PUT() changes the current working directory to the specified Directory_Name.

Example

Populate an array with the names of all tables in the A_SPORTS directory. The current directory will be saved and restored after the operation.

dim file_names[250] as C
old_directory = dir_get()
dir_put("c:\a5\a_sports")
files = filefind.first("*.dbf")
i = 1
while .not. files.eof()
    file_names[I] = files.name()
    files.next()
    i = i + 1
end while
dir_put(old_directory)

See Also