Listing FTP Virtual Directories Using Iisftpdr.vbs (IIS 6.0)
You can use the command-line script iisftpdr.vbs, which is stored in systemroot\system32, to list FTP virtual directories on local or remote computers running a member of the Windows Server 2003 family with IIS 6.0.
The /query operation displays only virtual directories and not physical directories. Further, it displays only virtual directories at the root of the FTP site or path and does not search recursively.
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer\Administratorcmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script's full path and any parameters).
This topic includes the following information:
iisftpdr /query FTPSite[/VirtualPath][/s Computer [/u [Domain\]User/p Password]]
Required. Specifies the descriptive name or the metabase path of the Web site.
Specifies a path, if necessary, to the virtual directory within the Web site. This parameter is required when the virtual directory is not located at the root of the Web site.
Runs the script on the specified remote computer. Type the computer name or IP address without backslashes. The default is the local computer.
Runs the script with the permissions of the specified user account. This account must be a member of the Administrators group on the remote computer. By default, the script runs with the permissions of the current user of the local computer.
Specifies the password of the user account that is specified in the /u parameter.
The following example displays the virtual directories at the root of the "Test Downloads" FTP site on the local computer:
iisftpdr /query "Test Downloads"
The /s, /u, and /p parameters are unnecessary in this instance because the default computer is local and the user who is running the command must be logged on as an administrator.
In response, iisftpdr displays the "Scripts" virtual directory at the root of the "Test Downloads" FTP site. Note that the directory appears at the root even though its physical location is unrelated.
This display does not include virtual directories that are subdirectories of the site. The procedure for finding subdirectories is demonstrated below in Example 2.
Alias Physical Root
"Alias" represents the names of the virtual directories while "Physical Root" describes their actual locations.
The following example displays the virtual directories that are subdirectories of the "Scripts" virtual directory on the "Test Downloads" FTP site. The command specifies the "Scripts" virtual directory by using its virtual path. Note that the quotation marks enclose only the path component that requires them.
iisftpdr /query "Test Download"\Scripts
In response, iisftpdr displays the VBScripts subdirectory of the "Scripts" virtual directory.
Alias Physical Root