6.2 DOSFileMgr Object

The top-level object of the DOS File Manager UCX component. The CurrentDir and Element methods of this object return the Entry component.

6.2.1 CurrentDir property

Returns an entry which represents the current working directory.

Syntax

 Object.CurrentDir
 

Type

Entry.

Attributes

Read-only.

Example

This example returns an entry that represents the current working directory.

 set dosfm = CreateObject("ucx:DOSFileMgr") 
 set Entry = dosfm.CurrentDir 
 print("Current directory is: "& Entry.Name)
 

6.2.2 DOSPresent property

Determines whether or not the server has a DOS partition.

Syntax

 object.DOSPresent
 

Type

Boolean.

Attributes

Read-only.

Example

This example returns TRUE if the server has a DOS partition; otherwise, FALSE.

 set dosfm = CreateObject("ucx:DOSFileMgr") 
 If(dosfm.DOSPresent = TRUE) then 
      print("A DOS partition is present on the server") 
 Endif
 

6.2.3 Server property

Returns the full path of the directory that contains the server executable (server.exe).

Syntax

 object.Server
 

Type

String.

Attributes

Read-only.

Example

This example returns the full path of the directory that contains the server executable (server.exe).

 Set dosfm = CreateObject("ucx:DOSFileMgr") 
      Print("Path to server files:" & dosfm.Server)
 

6.2.4 ChangeDir method

Changes the current directory.

Syntax

 object.ChangeDir(
    Dir As String)
 

Parameters

Dir
The relative or absolute path of the directory to change to.

Return Values

Boolean. Returns TRUE if the change is successful; otherwise, FALSE.

Example

This example changes to the c:\user directory.

 Set dosfm = CreateObject("ucx:DOSFileMgr") 
 dosfm.ChangeDir("c:\user")
 

6.2.5 Copy method

Copies a file within the DOS file system.

Syntax

 object.Copy(
    (srcFileName As String, 
    dstFileName As String)
 

Parameters

srcFileName
The absolute path to the source file.
dstFileName
The absolute path to the destination file.

Return Values

Boolean. Returns TRUE if the copy is successful; otherwise, FALSE.

Remarks

srcFileName and dstFileName files reside on either the DOS file system or the NetWare file system and should be managed by absolute paths.

Example

This example copies autoexec.ncf to the c:\temp directory.

 set dosfm = CreateObject("ucx:DOSFileMgr") 
 dosfm.Copy("c:\nwserver\autoexec.ncf", "c:\temp")
 

6.2.6 FindEntry method

Finds a file or directory by path.

Syntax

 object.FindEntry(
    (Path As String)
 

Parameters

Path
The absolute path of the file or directory to find.

Return Values

Entry. Returns the Entry object corresponding to the specified path.

Example

This example returns an entry object corresponding to c:\user.

 set dosfm = CreateObject("ucx:DOSFileMgr") 
 set Entry = dosfm.FindEntry("c:\user")