cheers for the reply.

i've tried using your example and it works to a certain extent.
but not how i want it to

i set up a folder called test and put 7 jpgs in it 3 had file names ending in 1 and 4 in two

when i click onthe command button nothing is pushed into the listboxes.
but two text files are created in the test folder list1.txt contains all the jpg file names and list2.txt contains nothing.

what i want is to have a directory structure like so

c:\testfolder\ testfolder1
\testfolder2
\testfolder3
\testfolder4

the program will go through each folder within the testfolder parent folder.
split the jpgs into one group that ends in1 and one that ends in two and puts them into separate files along with as much individual file info as i can get.

so i guess that the easiest way would be t use the filesystemobject in some way. quite how i dont know.

thanks for the help anyway