File Management

File Management Function

DeleteFile Deletes an error-tolerant file
ExeName Full File Name of Executable ( Application )
File Tests for the existence of file(s)
FileMove Moves file(s) to another directory
FileDelete Deletes file(s) by name and attribute
FileSeek Searches for files by name and attribute
HB_FNameExists Detect File / Folder existence
HB_ProgName Returns name and directory of the current Harbour program
HB_FileExists Tests for the existence of a file
HB_FileMatch Makes a file comparison with mask
HB_FTempCreate Creates and opens a temporary file
HB_FTempCreateEx Creates and opens a temporary file with extension
RenameFile Fault tolerant renaming of a file
TempFile Creates a file for temporary use

HB_ProgName

HB_ProgName

Returns name and directory of the current Harbour program

Syntax

      HB_ProgName() --> <cProgram>

Returns

<cProgram> : Drive, path and file name of the current .EXE program

Description

This function determines the name and path of the Harbour application in use

Note

This function is synonim of ExeName() and HB_ArgV()

Example

      Determine if the name or path of an EXE file has changed:

      cOrigPath  :=  "C:\DATA\ADDRESS.EXE"
      IF HB_ProgName() <> cOrigPath
         ? "Program name or directory have been changed!"
         QUIT
      ENDIF

Seealso

ExeName(), HB_ArgV(), HB_DirBase()

HB_DirBase

HB_DirBase

Drive and directory name of running executable ( application )

Syntax

      HB_DirBase() -> <cExeFolder>

Argument

None

Returns

<cExeFolder> : Folder name of running .exe

Description

HB_DirBase() returns folder name of application

Example :

      HB_DirBase() is equivalent to :

      LEFT( ExeName(), RAT( '\', ExeName() ) )

      and

      HB_FNameDir( ExeName() )

      and

      cExeDir := ''
      HB_FNameSplit( ExeName(), @cExeDir )

Seealso

HB_ArgV(), ExeName(), HB_FNameDir(), HB_FNameSplit()

CT_EXENAME

 EXENAME()
 Returns name and directory of the current Clipper program
------------------------------------------------------------------------------
 Syntax

     EXENAME() --> cProgram

 Returns

     EXENAME() returns the name and path of the current .EXE program.

 Description

     This function determines the name and path of the Clipper application
     in use.

 Note

     .  Use the TOKEN() function to determine the name portion of a
        program within a path.

 Example

     Determine if the name or path of an EXE file has changed:

     cOrigPath  :=  "C:\DATA\ADDRESS.EXE"
     IF EXECNAME() <> cOrigPath
        ? "Program name or directory have been changed!"
        QUIT
     ENDIF

See Also: TOKEN()



Tools – System Information

Introduction System Information
BIOSDATE()   Determines the system BIOS date
BOOTCOLD()   Triggers a cold boot
BOOTWARM()   Triggers a warm start of the system
CPUTYPE()    Determines what type of microprocessor in use
DOSPARAM()   Retrieves the DOS command line as a string
ENVPARAM()   Reads the entire DOS environment table into a string
ERRORACT()   Recommends action for a DOS error that has occurred previously
ERRORBASE()  Source of the most-recent DOS error
ERRORCODE()  Identifies a DOS error that has occurred previously
ERRORORG()   Origin of the most-recent DOS error
EXENAME()    Returns name and directory of the current Clipper program
FILESFREE()  Specifies the number of files you can open
FILESMAX()   Specifies maximum number of files that can be open at one time
GETCOUNTRY() Queries country setting for the operating system
ISANSI()     Tests to see if the ANSI screen driver is installed
ISAT()       Determines if a program is running on an AT
ISMATH()     Determines if a math coprocessor is installed
MEMSIZE()    Determines size of conventional or extended memory
NUMBUFFERS() Determines the BUFFERS= setting
NUMFILES()   Determines maximum number of files you can open simultaneously
OSVER()      Returns the DOS version number
PCTYPE()     Returns the type of computer in use
SSETBREAK()  Sets and checks the DOS BREAK switch
SSETVERIFY() Sets and checks the DOS VERIFY switch