yap , sorry , I deleted one more line ....
the code should be like this .....
#include <file.au3>
If FileExists("c:\erp\pbd.txt") Then
FileDelete("c:\erp\pbd.txt")
EndIf
RunWait(@ComSpec & " /c" & "dir /b c:\erp\*.pbd >> c:\erp\pbd.txt",'', @SW_HIDE)
$count_lines = _FileCountLines("c:\erp\pbd.txt")
$file = FileOpen("c:\erp\pbd.txt", 0)
$i = 1
While $i <= $count_lines
$line = FileReadLine($file)
$t = FileGetTime("c:\erp\" & $line, 0)
$t1 = FileGetTime("\\erp-server\erp\pbd\" & $line ,0)
msgbox(4096,"title",$t)
$i=$i+1
WEnd
FileClose($file)