deleting files with the sam extension

hi,

:foreach i in=[/file find] do={:if ([:typeof [:find [/file get $i name] “.rsc”]]!=“nil”) do={/file remove $i}}
:foreach i in=[/file find] do={:if ([:typeof [:find [/file get $i name] “.backup”]]!=“nil”) do={/file remove $i}}

this script remove all rsc and backup files in Mt 3.x. Working nice.
But, in 4.x remove only .rsc, and the .backups are left over.
Any idea, how can i fix it?

Thanks, bestefan

on 5.0rc8:

/file remove [find type="backup"]
/file remove [find type=".rif file"]

have to check what type you want to find before.

this can be done this way as /file remove command supports multiple arguments.

janisk :

/file remove [find type=“.rif file”] is OK

But what if I have to delete all .rif files that are into a directory ? Which syntax ?

P:S: I mean ONLY the .rif files that are inside a particular directory, not other .rif files