Amiga.org

Amiga computer related discussion => General chat about Amiga topics => Topic started by: pieter1976 on August 20, 2011, 12:23:36 AM

Title: for..each in CLI
Post by: pieter1976 on August 20, 2011, 12:23:36 AM
I'd like to create a CLI batch file doing something like this:

For Each in Do
{}

But i don't know how.

Anyone?
Title: Re: for..each in CLI
Post by: SamuraiCrow on August 20, 2011, 04:37:03 PM
Use the "spat" script in s: to do it.  It uses the list command with formatting options to write a temporary script in t:, then executes it.
Title: Re: for..each in CLI
Post by: gertsy on August 21, 2011, 02:48:32 PM
Hmm, No PC DOS commands don't work.  Samurai's tip to create a executable script made up of your commands for each file sounds like the way to go.
If what you are doing is file property based you can use wild cards #?.