Use the DeleteData or DeleteDE functions from Platform functions. These functions are for deleting mass amounts of data from a Data Extension, the Rows.Remove is more for use with manipulating a single row.
DeleteData(S1,A1,A2)
Use this method to delete information from a data
extension as indicated by the array containing the listed column name
and value pairs. You can include multiple column name and value pairs
in a single call. You can use this method in non-sending contexts,
such as landing pages. This call returns the number of rows modified.
Arguments
S1 - String value indicating the name of the data extension
A1 - Array
containing the names of the columns from the data extension
A2 - Array
containing the relevant values in the data extension
Example
<script runat="server">
var rows = Platform.Function.DeleteData('CustomerData',['LastName'],['Smith']);
</script>
This example deletes the rows from the data extension with
the LastName value of Smith.
DeleteDE(S1,A1,A2)
Use this method to delete information from a data
extension as indicated by the array containing the listed column name
and value pairs. You can include multiple column name and value pairs
in a single call. You can use this method in sendable contexts, such
as email messages.
Arguments
S1 - String value indicating the name of the data extension
A1 - Array
containing the names of the columns from the data extension
A2 - Array
containing the relevant values in the data extension
Example
<script runat="server">
var rows = Platform.Function.DeleteDE('CustomerData',['LastName'],['Smith']);
</script>
This example deletes the rows from the data extension with
the LastName value of Smith.