That's simple. Every time it finds a .DAT file it executes the $cmdstr. The question is, what you you really want to do? Just copy each .DAt file that is found or copy the whole directory if there is a .DAt file inside the directory? If it's the former then you'll need to modify $cmdstr so that it only copies that particualr file.

[ 09. October 2002, 19:56: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.