Ftp: ls

Updated: April 17, 2012

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

Displays an abbreviated list of files and subdirectories from the remote computer. For examples of how this command can be used, see Examples.

Syntax

ls [<RemoteDirectory>] [<LocalFile>]

Parameters

Parameter Description

[<RemoteDirectory>]

Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.

[<LocalFile>]

Specifies a local file in which to store the listing. If a local file is not specified, results are displayed on the screen.

Examples

Display an abbreviated list of files and subdirectories from the remote computer.

ls

Get an abbreviated directory listing of Dir1 on the remote computer and save it in a local file called DirList.txt

ls Dir1 DirList.txt 

Additional references