Differences
This shows you the differences between the selected revisions of the page.
2012-09-24 | 2013-05-07 | ||
5.1 is stable (martin) | Converting to .NET Assembly (martin) | ||
Line 17: | Line 17: | ||
</code> | </code> | ||
+ | ===== Converting to .NET Assembly ===== | ||
+ | When [[library_from_script|converting script to .NET Assembly]], map ''rm'' command to ''[[library_session_removefiles|Session.RemoveFiles]]'' method. | ||
+ | Parameters mapping: Command parameter ''file'' maps to method parameter ''path''. When multiple source file parameters are used, you need to call ''Session.RemoveFiles'' multiple times. You have to [[library_from_script#paths|convert relative paths to absolute paths]]. | ||
+ | |||
+ | For example, following script snippet: | ||
+ | |||
+ | <code winscp> | ||
+ | cd /home/martinp/public_html | ||
+ | rm index.html about.html | ||
+ | </code> | ||
+ | |||
+ | maps to following PowerShell code: | ||
+ | |||
+ | <code powershell> | ||
+ | $session.RemoveFiles("/home/martinp/public_html/index.html") | ||
+ | $session.RemoveFiles("/home/martinp/public_html/about.html") | ||
+ | </code> |