Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distinct VIT: Ftp Client: DirAction

   Products   Downloads   Sales   Support   About us
  VIT



        
 
Summary

Change, create, delete, list or rename directory on server.

Description

The DirAction property accesses directories on the FTP server. Subdirectories in the current working directory can be created, deleted and renamed and the current working directory can be changed or its contents can be listed in short or long format.

Value Meaning
DIR_ACTION_ABORT Abort directory list action in progress.
DIR_ACTION_CHANGE Change current working directory.
DIR_ACTION_CREATE Create subdirectory in current directory.
DIR_ACTION_DELETE Delete subdirectory in current directory.
DIR_ACTION_LIST List contents of current directory.
DIR_ACTION_PARENT Change to parent directory of current directory.
DIR_ACTION_RENAME Rename subdirectory in current directory.

This property can be changed at run time only.

Before setting the DirAction property to DIR_ACTION_CREATE, DIR_ACTION_DELETE or DIR_ACTION_RENAME, the name of the subdirectory on which the operation should be performed must be assigned to the Target property. In case of the DIR_ACTION_RENAME action, the new name of the subdirectory must also be assigned to the NewName property.

Changing the current working directory with the DIR_ACTION_PARENT action does not require any other properties. If the current directory is changed with the DIR_ACTION_CHANGE action, then the Target property must contain the name of the directory to change to. This target directory can be a subdirectory of the current directory, ".." (identical to DIR_ACTION_PARENT) or a fully qualified path to a new working directory. This allows an application to change to any directory on the server in just one step.

The contents of the current remote directory can be listed by setting DirAction to DIR_ACTION_LIST. The setting of the ListType property determines if a short or a long listing will be sent. For every entry in the remote directory, the OnList event is fired. If an application does not want to receive any more entries, then it can set the DirAction property to DIR_ACTION_ABORT in response to this event. Please check the OnList reference page of more information.

The value of the LastResult property can be checked to determine if the action has been performed successfully.

The AbortDir, ChangeDir, CreateDir, RemoveDir, ListDir, ParentDir and RenameDir methods accomplish the same as the above actions. Please check the reference pages of these methods for more detailed information on their usage.

There is no default value for this property.

Example

FTPClient.ListType = LIST_TYPE_LONG
FTPClient.DirAction = DIR_ACTION_LIST

Note

If you are writing a new application it is recommended to use the corresponding methods for these actions instead.



Browse FAQ

Related Products
Mail Objects

Recommended Add-On
Network Monitor,
Protocol Analyzer


Raves
"The night before I went on summer holiday we had to make some 'last minute' configuration changes to approx. 300 routers, a tedious job to do manually with telnet. We went along with MS Excel containing a list of IP-adresses to the routers, and the VIT telnet-component. One hour later the VBA-application (small is beautiful) was working, and after another hour all of our routers were updated with the new configuration. I just say a big "Thanks" to you all for a good sleep that night."
Eirik Brendholen, Ergo Integration AS

"We conducted a test session to compare the performance of similar products, and Distinct's product was better!" [more]
Dr. Shyam Sunder, Carnegie Mellon University

"Together with Distinct, we were able to offer our users an ideal soution to enabling them to connect to Yahoo! Pager, and to do so both quickly and reliably." [more]
Brian Park,
Producer of Yahoo! Pager, Yahoo! Inc.


  8/20/2008   Legal notices | PRIVACY Policy | Networking News |