rm

Table of Contents

Removes one or more remote files.

Syntax

rm <file> [ <file2> ... ]

Remarks

If remote recycle bin is configured, moves file to the bin instead of deleting it. Filename can be replaced with wildcard to select multiple files.

Advertisements:

Can remove non-empty directories recursively.

XML log element: rm

Examples

rm index.html
rm index.html about.html
rm *.html

Converting to .NET Assembly

When converting script to .NET Assembly, map rm command to Session.RemoveFiles method.

Parameters mapping: Command parameter file maps to method parameter path. When multiple file parameters are used, you need to call Session.RemoveFiles multiple times. You have to convert relative paths to absolute paths.

For example, following script snippet:

cd /home/martinp/public_html
rm index.html about.html

maps to following PowerShell code:

$session.RemoveFiles("/home/martinp/public_html/index.html")
$session.RemoveFiles("/home/martinp/public_html/about.html")
 
  scriptcommand_rm.txt · Last modified: 15 May 2013 by prikryl
 

Search Documentation

This page

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

Associations

Kyplex Cloud Security Seal - Click for Verification

Site design by Black Gate