DISKUTILS

Name

DISKUTILS -- 

Function

nFiles              ADIR([<cFilespec>],[<aFilenames>],[<aSizes>],[<aDates>], [<aTimes>],[<aAttributes>])
cDirectory          CURDIR([<cDrivespec>])
nSuccess            DIRCHANGE(<cDir>)
nSuccess            DIRMAKE(<cNewDir>)
nSuccess            DIRREMOVE(<cDirName>)
lSuccess            DISKCHANGE(<cDrive>)
cDrive              DISKNAME()
nBytes              DISKSPACE([<nDrive>])
<sDosFileName>      DOSPATH(<sUnixFileName>)
<sUnixPath>         MAKEPATH(<sDosPath>)
<sPath>             STARTPATH()

Description

Function ADIR()

 ADIR([<cFilespec>],[<aFilenames>],[<aSizes>],[<aDates>],
 [<aTimes>],[<aAttributes>]) --> nFiles

ADIR() is an array function that performs two basic operations. First, it returns the number of files matching the file specification. Second, it fills a series of arrays with file names, sizes, dates, times, and attributes.

ADIR() is a compatibility function and therefore not recommended. It is superseded by the DIRECTORY() function which returns all file information in a multidimensional array.

Function CURDIR()

 CURDIR([<cDrivespec>]) --> cDirectory

CURDIR() is an environment function that gives you the name of the current DOS directory, ignoring the SET DEFAULT and SET PATH settings.

Function DIRCHANGE()

 DIRCHANGE(<cDir>) --> nSuccess

DIRCHANGE() changes the current DOS directory. This function may also be used to determine whether or not a directory exists.

Function DIRMAKE()

 DIRMAKE(<cNewDir>) --> nSuccess

DIRMAKE() creates a specified directory. Note that first you must have sufficient rights to create a directory. To create nested subdirectories, you must create each subdirectory separately, starting from the top-level directory that you want to create (see example below.)

Function DIRREMOVE()

 DIRREMOVE(<cDirName>) --> nSuccess

DIRREMOVE() removes a specified directory. Note that you must first have sufficient rights to delete a directory. A directory must be empty in order to be deleted. Therefore, to delete a directory that contains subdirectories, you must first delete the subdirectories (see example below).

Function DISKCHANGE()

 DISKCHANGE(<cDrive>) --> lSuccess

Function DISKNAME()

 DISKNAME() --> cDrive

Function DISKSPACE()

 DISKSPACE([<nDrive>]) --> nBytes

DISKSPACE() is an environment function that determines the number of available bytes remaining on the specified disk drive. It is useful when COPYing or SORTing to another drive to determine if there is enough space available before initiating the operation. You may also use DISKSPACE() with RECSIZE() and RECCOUNT() to create a procedure to back up database files.

DISKSPACE() ignores the SET DEFAULT drive setting.

Function DOSPATH()

 DOSPATH(<sUnixFileName>) 	--> <sDosFileName>

DOSPATH() uses specified in CLIP function SET("C", ...) values and returns UNIX file name as DOS file name.

Function MAKEPATH()

  MAKEPATH(<sDosPath>) 	--> <sUnixPath>
 

MAKEPATH() converts string with path to file in DOS-style <sDosPath> to string with path in UNIX-style <sUnixPath>

Function STARTPATH()

 STARTPATH() 	--> <sPath>

STARTPATH() returns the string <sPath> what contain full path and name of started program.