Back to product page

Add method


Adds new virtual folder.

Syntax

  • Basic
object.Add RelativePath, Name, ResolvedPath
The Add(object,RelativePath,Name,ResolvedPath) syntax has these parts:
objectAn expression evaluating to an object of type VirtualFolders.
RelativePathRequired. A String value. Holds path where virtual folder appears (may contain wildcards).
NameRequired. A String value. Holds name of virtual folder.
ResolvedPathRequired. A String value. Holds full path where virtual folder resolves.

Remarks

Add method will add new virtual folder to the collection - for the User or globally for the server. Adding new virtual folders for the server - through wodFTPD.VirtualFolders property will affect only new users that connect - any users currently online will not see new folder until they reconnect. To add new virtual folder to existing (currently connected) users, use User.VirtualFolders collection.

For example, to add virtual folder for all new users that will be visible in their root path, and would point to, for example, your CD, you can do this:
 
FtpD.VirtualFolders.Add "/", "CDROM", "F:\"
 

Users will see virtual folders just as they really exist in your filesystem - they will not know the difference.

Platforms

Windows