Does this code:

SHELL '%COMSPEC% /C "REN path\*.apd* *.apd" >NUL 2>NUL'
? 'Result was: '+@ERROR+' '+@SERROR

------------------
will it not create conflict if i have many of those 3 files i've created. Let us say that i have 150 files in one directory and the only different is its files extensions having the following samples;

GREG_PKTFILE.APD_10062003153155
GREG_PKTFILE.APD_10062003160529
GREG_PKTFILE.APD_10062003171459
GREG_PKTFILE.APD_10062003172522
GREG_PKTFILE.APD_10062003190028
GREG_PKTFILE.APD_10072003094000
GREG_QTYPERFILE.APD_10062003153155
GREG_QTYPERFILE.APD_10062003160529
GREG_QTYPERFILE.APD_10062003171459
GREG_QTYPERFILE.APD_10062003172522
GREG_QTYPERFILE.APD_10062003190028
GREG_QTYPERFILE.APD_10072003094000
GREG_QTYPERFILE.APD_10072003102554
GREG_WLOTFILE.APD_10062003172522
GREG_WLOTFILE.APD_10062003190028

Considering files above..my purpose is when i found files having same file extension, i will rename those file by just removing _{DateRun} and the renamed files will only have the extension of .APD . How will i do this?.

Thank you [Smile]