Once again, the SPACE monster rears its ugly head!

DOS - still, in the world of long file names and allowed special characters - still CHOKES on these. What you can do easily in Windows and Kix requires a bit more consideration when you invoke the shell. Eliminating spaces can go a long way in making things work better.

So - you have a group called "Some Special Bunch Of Users" - the spaces are OK. You want to run a command based on the group, so you think "Some Special Bunch Of Users.CMD" is the way to go. Well, not so much..

Simple change - your batch file is called "SomeSpecialBunchOfUsers" and you tell Kix to remove the spaces from the group name before adding the ".CMD" extension. Here's how
 Code:
Do
    $DomainGroup = ENUMGROUP($Index)
    $DomainGroup ?
    $Index = $Index + 1
    IF INSTR($DomainGroup,@DOMAIN)
	$Group = Join(Split(SubStr($DomainGroup, Len(@DOMAIN) + 2), ' '), '')
	$Script = $LDRIVE + $Group + $ext
	If Exist($Script)
	  'RUNNING ' $Script ?
	  Shell $Script
	  @SERROR ?
	EndIf
    EndIf
Until Not $DomainGroup
Of course, you could replace the spaces with underscores just as easily by inserting a "_" character between the empty pair of quotes on the Join/Split line.

This isn't a "fix" so much as a method to overcome the limitations that still exist when calling batch files. You'd be surprised by how many other applications still suffer from this - Oracle, for example, will choke if your TEMP var references a path with spaces.. change it to C:\Temp and it's happy. \:\(

Glenn
_________________________
Actually I am a Rocket Scientist! \:D