Chad, Chad, Chad, You just got my "Ron Oglesby: That's the Sh*t award".... Anyway Paul, here ya go: This stuff is the sh*t, as Chad said.=20 Anyway here is their piece from the help file on FOR EACH, You may want to use the WHILE LOOP or FOR NEXT, depends on how the script plays out. >>>>>>>>>>>>>>>> For Each Action: Repeats a group of statements for each element in an array or collection. =20 Syntax: FOR EACH $element IN group statements... NEXT=20 FOR EACH loops can be nested as many times as memory allows. =20 =20 Parameters: Element Variable used to iterate through the elements of the collection or array. Group Name of an object collection or array. =20 Remarks: The For Each block is entered if there is at least one element in group. Once the loop has been entered, all the statements in the loop are executed for the first element in group. As long as there are more elements in group, the statements in the loop continue to execute for each element. When there are no more elements in group, the loop is exited and execution continues with the statement following the Next statement. =20 See Also: Do Until, For Next, While Loop =20 Examples: Dim $MyArray[10] For Each $Element In $MyArray ? $Element Next $Root =3D GetObject( "LDAP://localhost"; ) For Each $Obj in $Root ? $Obj.name Next >>>>>>>>>>>>>>>>>> Ron Oglesby Senior Technical Architect =20 RapidApp Office 312.372.7188 Mobile 312.961.2380 email roglesby@xxxxxxxxxxxx =20 -----Original Message----- From: Schneider, Chad M. [mailto:CMSchneider@xxxxxxxxx]=20 Sent: Tuesday, November 12, 2002 2:23 PM To: 'thin@xxxxxxxxxxxxx' Subject: [THIN] Re: WAY OT: Kix script question That's the sh*t! -----Original Message----- From: Ron Oglesby [mailto:roglesby@xxxxxxxxxxxx] Sent: Tuesday, November 12, 2002 2:05 PM To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: WAY OT: Kix script question How about a FOR command? Check out the KIX help. And some run commands will probably do what you want. Ron Oglesby Senior Technical Architect =3D20 RapidApp Office 312.372.7188 Mobile 312.961.2380 email roglesby@xxxxxxxxxxxx =3D20 -----Original Message----- From: Stansel, Paul [mailto:Paul.Stansel@xxxxxxxxxxxxx]=3D20 Sent: Tuesday, November 12, 2002 1:57 PM To: 'thin@xxxxxxxxxxxxx' Subject: [THIN] WAY OT: Kix script question Ok... here's what I'm trying to do. Let me know if I am way off base with this one :). I have a program that returns a directory listing of the files on my ReplayTV box. It looks like a fairly typical directory listing, and there are multiple file types. For instance: 1003909909.mpg 1034998099.prt etc; The files are a fixed length. What I want is to extract just the names of the .mpg files and then feed them back to a command line program that will be able to use them one at a time to download the specific mpg file. I guess I will just set an environment variable with it, then feed that variable in to the command line. It would have to loop until there were no more files and then exit. So... I get the very basics (calling the program, Opening the file, etc;) What I am not sure on is masking it so it will pull just the .mpg files, and how I need to make the loop so it will finish when there are no more .mpg names. Any ideas? I 'm going to play with it and see what I come up with, but a pointer in the right direction would be great. Thanks, Paul ***********************************************=3D20 For Archives, to Unsubscribe, Subscribe or=3D20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ***********************************************=20 For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm ***********************************************=20 For Archives, to Unsubscribe, Subscribe or=20 set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm *********************************************** For Archives, to Unsubscribe, Subscribe or set Digest or Vacation mode use the below link. http://thethin.net/citrixlist.cfm