Why don't you use the system() routine rather than reinventing the wheel with a routine that essentially does the same thing? system() is more portable to non-UNIX systems and it makes your source code smaller and clearer. -- - Matt Day, Sanyo/Icon, mday at iconsys.icon.com || uunet!iconsys!mday