Page 1 of 1

Remove all "auto.rsc" files via script

Posted: Mon Apr 13, 2009 4:41 pm
by conchalnet
Hi all,

I'm interesting in remove all files that have the named finished by "auto.rsc" using a script.

I tried to use the * as a name mask but it didn't work.

I tried the follow forms:

/file remove "*auto.rsc"
:foreach i in=[/file find name="*auto.rsc"] do=[/file remove $i]

How can I solve this?

Thanks in advance

Fabrício

Re: Remove all "auto.rsc" files via script

Posted: Mon Apr 13, 2009 4:56 pm
by ayufan
:foreach i in=[/file find] do={:if ([:typeof [:find [/file get $i name] "auto.rsc"]]!="nil") do={/file remove $i}}

Re: Remove all "auto.rsc" files via script

Posted: Tue Apr 14, 2009 5:17 pm
by conchalnet
thanks ayufan, it's the solution!

best regards!

Re: Remove all "auto.rsc" files via script

Posted: Fri Apr 17, 2009 8:33 pm
by ronaldoo
Hi all,

I'm interesting in remove all files that have the named finished by "auto.rsc" using a script.

I tried to use the * as a name mask but it didn't work.

I tried the follow forms:

/file remove "*auto.rsc"
:foreach i in=[/file find name="*auto.rsc"] do=[/file remove $i]

How can I solve this?

Thanks in advance

Fabrício

Thanks !