Ok, thanks for your help guys, anyway..what i will have to do here is to compare files that created the same time, anyway the other program that created those files will only create 3 files and will only differ from the 3 other files by just the date it rans.

GREG_PKTFILE .APD_[DateRun]
GREG_QTYPERFILE .APD_[DateRun]
GREG_WLOTFILE .APD_[DateRun]

I will have compare filetime created, and if i found file having same time of creation, i will have to move those files to a different directory, and there i renamed or removed extension when it was ran.

So the output would then be;

GREG_PKTFILE.APD
GREG_QTYPERFILE.APD
GREG_WLOTFILE.APD

[Wink] [Wink]