Differences
This shows you the differences between the selected revisions of the page.
scriptcommand_ls 2013-05-07 | scriptcommand_ls 2020-10-16 (current) | ||
Line 1: | Line 1: | ||
- | ====== ls ====== | + | ====== ls command ====== |
Lists the contents of specified remote directory. | Lists the contents of specified remote directory. | ||
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
ls [ <directory> ]/[ <wildcard> ] | ls [ <directory> ]/[ <wildcard> ] | ||
- | Lists the contents of specified remote directory. If ''directory'' is not specified, lists working directory. When ''wildcard'' ((Windows wildcard supports ''*'' and ''?'' only. It does not support all the features of [[file_mask|file masks]].)) is specified, it is treated as set of files to list. Otherwise, all files are listed. | + | ===== [[remarks]] Remarks ===== |
+ | |||
+ | Lists the contents of specified remote directory. If ''directory'' is not specified, lists working directory. When ''[[file_mask|wildcard]]'' ((Only single include mask can be specified.)) is specified, it is treated as set of files to list. Otherwise, all files are listed. | ||
Alias: ''dir'' | Alias: ''dir'' | ||
+ | |||
+ | Effective [[scriptcommand_option|options]]: ''[[scriptcommand_option#failonnomatch|failonnomatch]]'' | ||
XML log element: ''[[logging_xml#ls|ls]]'' | XML log element: ''[[logging_xml#ls|ls]]'' | ||
- | ===== Examples ===== | + | ===== [[examples]] Examples ===== |
<code winscp> | <code winscp> | ||
ls *.html | ls *.html | ||
+ | </code> | ||
+ | <code winscp> | ||
ls /home/martin | ls /home/martin | ||
+ | </code> | ||
+ | <code winscp> | ||
ls | ls | ||
+ | </code> | ||
+ | <code winscp> | ||
+ | ls /home/martin/*.html | ||
</code> | </code> | ||
- | ===== Converting to .NET Assembly ===== | + | ===== [[net]] Converting to .NET Assembly ===== |
When [[library_from_script|converting script to .NET Assembly]], map ''ls'' command to ''[[library_session_listdirectory|Session.ListDirectory]]'' method and print returned ''[[library_remotedirectoryinfo|RemoteDirectoryInfo]]'' in your preferred format. | When [[library_from_script|converting script to .NET Assembly]], map ''ls'' command to ''[[library_session_listdirectory|Session.ListDirectory]]'' method and print returned ''[[library_remotedirectoryinfo|RemoteDirectoryInfo]]'' in your preferred format. | ||
Line 28: | Line 42: | ||
</code> | </code> | ||
- | maps to following PowerShell code: | + | maps to following [[library_powershell|PowerShell]] code: |
<code powershell> | <code powershell> |