<cfx_kmSystem> cfx_kmSuite
Programming Reference

cfx_kmSystem contains functions related to the web server machine and operating system.

DirectoryCreate
DirectoryExists
DirectoryForce
DirectoryCreate
DirectoryRemove
DiskFreeSpace
DiskSize
ExpandUNCFileName
GetClipboardText
GetDomainName
GetIPAddress
GetLocalComputerName
GetLocalUserName
GetRegisteredCompany
GetRegisteredOwner
GetSystemDir
GetSystemMemory
GetTempDir
GetUserDomainName
GetVolumeFileSystem
GetVolumeName
GetVolumeSerialNumber
GetWindowsDir
Help
SetClipboardText
ShellExec
Version


F=DirectoryCreate

Description
Create a single directory on the server.

See also:
DirectoryForce
Returns
Yes=The create went OK
No=There was a problem.
Syntax
  <cfx_kmSystem  F=DirectoryCreate  V=variable  SHOW
      DIR=text >
Attribute   Description         Required?
DIR  Subdirectory pathname.  YES


F=DirectoryExists

Check for the existence of a directory on the server.

Returns
Yes=Subdirectory exists.
No=Subdirectory could not be found.
Syntax
  <cfx_kmSystem  F=DirectoryExists  V=variable  SHOW
      DIR=text >
Attribute   Description         Required?
DIR  Subdirectory pathname.  YES


Examples

<cfx_kmSystem F=DirectoryExists DIR="C:\temp">
<cfx_kmSystem F=DirectoryExists DIR="C:\temp\junk">
Result:  YES
NO



F=DirectoryForce

Force the creation of a directory on the server. Unlike DirectoryCreate, this function will accept a nested subdirectory where the parent directories do not necessarily exist. For example, forcing the creation of "c:\Dir1\Dir2\Dir3" will cause Dir1,Dir2, and Dir3 to be created if they did not previously exist. With DirectoryCreate, Dir1 and Dir2 must have previously been created in order to create Dir3.

(See also: DirectoryCreate)

Returns
Yes=The create went OK
No=There was a problem.
Syntax
  <cfx_kmSystem  F=DirectoryForce  V=variable  SHOW
      DIR=text >
Attribute   Description         Required?
DIR  Subdirectory pathname.  YES


F=DirectoryRemove

Remove a single directory from the server.
Returns
Yes=The remove went OK
No=There was a problem.
Syntax
  <cfx_kmSystem  F=DirectoryRemove  V=variable  SHOW
      DIR=text >
Attribute   Description         Required?
DIR  Subdirectory pathname.  YES


F=DiskFreeSpace

Return the free space on a server disk, in bytes.

Returns
Number of disk bytes free.
Syntax
  <cfx_kmSystem  F=DiskFreeSpace  V=variable  SHOW
      DRIVE=letter >
Attribute   Description         Required?
DRIVE  Optional drive letter, default=current drive.  no


Examples

<cfx_kmSystem F=DiskFreeSpace DRIVE="C">
Result:  4920180736



F=DiskSize

Return the total capacity of a server disk, in bytes.
Returns
Total number of bytes on the disk.
Syntax
  <cfx_kmSystem  F=DiskSize  V=variable  SHOW
      DRIVE=letter >
Attribute   Description         Required?
DRIVE  Optional drive letter, default=current drive.  no


Examples

<cfx_kmSystem F=DiskSize DRIVE="C">
Result:  7853768704



F=ExpandUNCFileName

Expand a mapped, local file path name to UNC name format. If the path is on a mapped network drive, the drive spec is converted to a UNC server location.

Returns
UNC file path name.
Syntax
  <cfx_kmSystem  F=ExpandUNCFileName  V=variable  SHOW
      FILE=text >
Attribute   Description         Required?
FILE  A local file name.  YES


F=GetClipboardText
Return the text currently in the web server clipboard, if any.

Returns
The clipboard text, if any. If no text was available, the return value is blank.
Syntax
  <cfx_kmSystem  F=GetClipboardText  V=variable  SHOW >


F=GetDomainName
Return the web server domain name.

Syntax
  <cfx_kmSystem  F=GetDomainName  V=variable  SHOW >


F=GetIPAddress
Given a domain name, return it's IP address, if known

Syntax
  <cfx_kmSystem  F=GetIPAddress  V=variable  SHOW
      DOMAIN=domain-name >
Attribute   Description         Required?
DOMAIN  Optional domain name. Default=The web server's local domain.  no


F=GetLocalComputerName
Return the machine name of the web server.
Syntax
  <cfx_kmSystem  F=GetLocalComputerName  V=variable  SHOW >


F=GetLocalUserName
Return the web server local user name.
Syntax
  <cfx_kmSystem  F=GetLocalUserName  V=variable  SHOW >


F=GetRegisteredCompany

Return the web server operating system registered company name.
Syntax
  <cfx_kmSystem  F=GetRegisteredCompany  V=variable  SHOW >


F=GetRegisteredOwner

GetRegisteredOwner - Return the web server operating system registered owner name.
Syntax
  <cfx_kmSystem  F=GetRegisteredOwner  V=variable  SHOW >


F=GetSystemDir

Return the server Windows SYSTEM directory. This is the location of the basic system DLL's, etc.

Returns
System directory.
Syntax
  <cfx_kmSystem  F=GetSystemDir  V=variable  SHOW >
Examples

<cfx_kmSystem F=GetSystemDir>
Result:  C:\WINDOWS\SYSTEM\



F=GetSystemMemory

Get web server memory information.

Returns
Returns the amount of free physical memory, in kBytes.

Further information is returned in the following variables:
   kmTotalRam - Total physical memory, in kBytes.
   kmUsedRam - Physical memory used, in kBytes.
   kmTotalSwap - Total swap file capacity, in kBytes.
   kmUsedSwap - Used swap file capacity, in kBytes.
Syntax
  <cfx_kmSystem  F=GetSystemMemory  V=variable  SHOW >


F=GetTempDir

Return the server Windows TEMP directory. This is the ppreferredlocation for creating temporary files.

Returns
Temp directory.
  <cfx_kmSystem  F=GetTempDir  V=variable  SHOW >
Examples

<cfx_kmSystem F=GetTempDir>
Result:  c:\windows\TEMP\



F=GetUserDomainName

F=GetUserDomainName - Return the domain name for the specified web server user.

Syntax
  <cfx_kmSystem  F=GetUserDomainName  V=variable  SHOW
        USER=text >
Attribute   Description         Required?
USER  Optional user name. Default=The web server's current local user account name.  no


F=GetVolumeName

Return the name of the specified web server disk volume.

Syntax
  <cfx_kmSystem  F=GetVolumeName  V=variable  SHOW
        DRIVE=drive-letter >
Attribute   Description         Required?
DRIVE  Optional drive letter, default=C:  no


F=GetVolumeSerialNumber

Return the serial number of the specified web server disk volume.

Syntax
  <cfx_kmSystem  F=GetVolumeSerialNumber  V=variable  SHOW
        DRIVE=drive-letter >
Attribute   Description         Required?
DRIVE  Optional drive letter, default=C:  no


F=GetVolumeFileSystem

Return the file system type of the specified web server disk volume.

Syntax
  <cfx_kmSystem  F=GetVolumeFileSystem  V=variable  SHOW
        DRIVE=drive-letter >
Attribute   Description         Required?
DRIVE  Optional drive letter, default=C:  no


F=GetWindowsDir

Return the server WINDOWS directory. This is the location of the basic Windows executables, profiles and other information.

Returns
Windows directory.
Syntax
  <cfx_kmSystem  F=GetWindowsDir  V=variable  SHOW >
Examples

<cfx_kmSystem F=GetWindowsDir>
Result:  C:\WINDOWS\
   



F=SetClipboardText
Copy the supplied text string to the web server clipboard.

Returns
YES if the operation went OK. NO if there was a problem.
Syntax
  <cfx_kmSystem  F=SetClipboardText  V=variable  SHOW
        STRING=text-string >


F=ShellExec

Open (execute) or print the specified file.

Returns
"Yes"=All OK.
Syntax
  <cfx_kmSystem  F=ShellExec  V=variable  SHOW
        FILE=file-pathname
        ACTION=exec-option
        PARAMETERS=cmd-params
        DIRECTORY=default-dir >
Attribute   Description         Required?
FILE  Required path name of the file.  YES
ACTION  Optional exec action to be taken. Default="open".
    "open" - Open (or execute) the named file.
   "print" - Print the named file.
 no
PARAMETERS  Optional command line parameters to be passed to the executing file.  no
DIRECTORY  Optional directory to set as "current" for execution of the file.  no