Creating Virtual FTP Directories (Windows CE 5.0)

Send Feedback

Windows CE enables you to create virtual FTP directories. Virtual directories appear to users who access your FTP site as a subdirectory of the FTP site's home directory, although they may be located in a different folder.

For example, if the FTP directory on your Windows CE-based device is set to the \Hard Disk\Ftproot directory, and your music files are stored under the \Hard Disk\Music folder, you can add the Music folder as a virtual root to the Ftproot directory. You create a virtual directory for the Music folder by associating the FTP virtual directory \Music with the real \Hard Disk\Music directory.

When users log onto the FTP server, they will see the Music folder in the FTP root directory and will be able to navigate to this folder as if it were actually located in the \Hard Disk\Ftproot\Music directory instead of in the \Hard Disk\Music directory.

You can only create virtual FTP directories at the root FTP directory. You cannot add nested or duplicate virtual roots, or separate virtual roots for folders that are children of another virtual root.

If you know the folder structure of your FTP server, you can create virtual directories by configuring the registry before you build your run-time image.

To create FTP virtual directories during the build process

  1. After you have created your initial OS design, in Platform Builder under the Project Specific Files node, double-click the Project.reg file.

  2. Add the following registry entry to the Project.reg file. Note that the virtual directory name after "VROOTS\" must begin with a slash (/).

    [HKEY_LOCAL_MACHINE\Comm\FTPD\VROOTS\</virtual_dir_name>]
    @="<real_path_name>"
    

    For example, to create a virtual directory for the Music folder, add the following syntax to Project.reg:

    [HKEY_LOCAL_MACHINE\Comm\FTPD\VROOTS\/Hard Disk\Ftproot\Music]
    @="\Hard Disk\Music"
    
  3. From the Build menu choose Build Platform to build your run-time image.

You can also use the registry to grant or deny anonymous user access to virtual directories by setting the value for the AllowAnonymousVroots subkey in the [HKEY_LOCAL_MACHINE\Comm\FTPD] registry key.

To deny an anonymous user access to an FTP virtual root, set the value of the AllowAnonymousVroots subkey to zero (0). To grant a specific user access to FTP virtual roots, set the value of the AllowAnonymousVroots subkey to 1.

See Also

FTP Server Application Development | FTP Server Registry Settings

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.