IISFtpdr.vbs: IIS FTP directory script
To view the command syntax, click a command:
iisftpdr /create
Syntax
Parameters
Remarks
- To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
- The FTPSite (or FTPSite/VirtualPath), Name, and PhysicalPath parameters must always appear in the specified order on the command line. Otherwise, Iisftpdr.vbs does not interpret the information correctly.
- When you use Iisftpdr.vbs to create a new virtual directory, you specify only the basic properties needed to create the directory and identify its contents. Iisftpdr.vbs uses the same default properties that IIS uses when establishing new virtual directories, and adheres to the same rules for inheriting properties. To configure the more advanced properties of the site, use IIS Manager.
Examples
To create a virtual directory at the root of the FTP site
iisftpdr /create"Test Downloads" Scripts c:\libraries\scripts
In response, Iisftpdr.vbs displays the following message, which indicates that the command was successful, and it also displays the basic properties of the new virtual directory.
Connecting to server ...Done. Virtual Path = Test Downloads/Scripts ROOT = c:\libraries\scripts Metabase Path = MSFTPSVC/577648624/ROOT/Scripts
The FTPSite (or FTPsite/VirtualPath), Name, and PhysicalPath parameters must always appear in the specified order on the command line. The following command is the same as the previous command except that the parameters are out of order:
iisftpdr /createc:\libraries\scripts"Test Downloads"Scripts
This command fails, and having misinterpreted the parameter, Iisftpdr.vbs reports that it cannot find an FTP site called "C:."
To create a virtual directory in an FTP site path
The first parameter in the command identifies the FTP site and virtual path, Finance\Documents. The second parameter, Updates, specifies the name of the virtual directory. The third parameter specifies the physical directory on Svr01 that stores the content of the virtual directory.
The command uses the /s command to identify the server computer, and the /u and /p commands to run Iisftpdr.vbs with the permissions of the user's Administrator account.
iisftpdr /createFinance/DocumentsUpdatesC:\inetpub\ftproot\documents \updates/s svr01/u Admin01/p p@SSw#rD2
In response, Iisftpdr.vbs displays the following message, which indicates that the command was successful, and it also displays the basic properties of the new virtual directory:
Connecting to server ...Done. Virtual Path = Finance/Documents/Updates ROOT = C:\inetpub\ftproot\documents\updates Metabase Path = MSFTPSVC/2109607139/ROOT/Documents
/Updates
In this example, the Finance FTP site and its Documents subdirectory existed on the Svr01 IIS server before the command was issued. If the FTP site or the subdirectory did not exist, the command would have failed.
iisftpdr /delete
Syntax
Parameters
Remarks
- To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
- Do not use Iisftpdr.vbs to delete an FTP site. If you do, the FTP site is still listed, but it is partially removed and does not operate properly. To delete an FTP site, or to correct the improper removal of an FTP site by Iisftpdr.vbs, use Iisftp.vbs: IIS FTP site management script .
Examples
To delete a virtual directory
iisftpdr /deleteFinance/Insurance
In response, Iisftpdr.vbs displays the following message indicating that the command was successful. Note that Iisftpdr.vbs does not ask for confirmation before deleting the directory or its subdirectories.
FTP directory Finance/Insurance has been DELETED.
iisftpdr /query
Syntax
Parameters
Remarks
- To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.
- The query operation displays only virtual directories. Physical directories in the FTP site or path do not appear.
Examples
To display the virtual directories of an FTP site
iisftpdr /query "Test Downloads"
In response, Iisftpdr.vbs displays the Scripts virtual directory at the root of Test Downloads. Note that the directory appears at the Test Downloads root even though its physical location is unrelated.
Alias Physical Root ====================================================== /Scripts C:\Libraries\Scripts
This display does not include virtual directories that are subdirectories of the site. The procedure for finding subdirectories is demonstrated in "To display virtual subdirectories."
To display virtual subdirectories
iisftpdr /query "Test Downloads"\Scripts
This command reveals the VBScripts subdirectory of the Scripts virtual directory, as shown in the following output:
Alias Physical Root ====================================================== /VBScripts D:\Scripts\Vbscripts
Remarks
- Iisftpdr.vbs performs the same operations that are available from IIS Manager. You can use either tool to view and manage virtual directories.
- The computer issuing the command must be running Windows XP or a server running Windows Server 2003. The user must be a member of the Administrators group on any computer that the command affects.
- The computer that the command affects must be a server running Windows Server 2003 with Internet Information Services (IIS) 6.0.
- Iisftpdr.vbs displays a "Connecting to server" message while it connects to the IIS service on the specified computer. This message appears whenever you use Iisftpdr.vbs, whether on a local or a remote computer.
- Use quotation marks to enclose path elements that include spaces. Enclose only the element with spaces, not the entire path. For example, type "Default FTP Site"/IISAdmin, not "Default FTP Site/IISAdmin".
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |