uznut Posted June 17, 2004 Share Posted June 17, 2004 (edited) i confused on how to do this i need it to compair the modified date on all of these then run a program is there a way to do this? $Server1 = GetFileTime("S:\\AdminShare\\foxprow\\fmmc.cdx") $Server2 = GetFileTime("S:\\AdminShare\\foxprow\\fmmctran.cdx") $Server3 = GetFileTime("S:\\AdminShare\\foxprow\\hcb.cdx") $Server4 = GetFileTime("S:\\AdminShare\\foxprow\\hcbtran.cdx") $Server5 = GetFileTime("S:\\AdminShare\\foxprow\\fmmc.dbf") $Server6 = GetFileTime("S:\\AdminShare\\foxprow\\fmmcshar.dbf") $Server7 = GetFileTime("S:\\AdminShare\\foxprow\\fmctran.dbf") $Server8 = GetFileTime("S:\\AdminShare\\foxprow\\hcb.dbf") $Server9 = GetFileTime("S:\\AdminShare\\foxprow\\hcbshare.dbf") $Server10 = GetFileTime("S:\\AdminShare\\foxprow\\hcbtran.dbf") $PC1 = GetFileTime(C:\\FOXPROW\\Newfmmc\\fmmc.cdx) $PC2 = GetFileTime(C:\\FOXPROW\\Newfmmc\\fmmctran.cdx) $PC3 = GetFileTime(C:\\FOXPROW\\Newfmmc\\hcb.cdx) $PC4 = GetFileTime(C:\\FOXPROW\\Newfmmc\\hcbtran.cdx) $PC5 = GetFileTime(C:\\FOXPROW\\Newfmmc\\fmmc.dbf) $PC6 = GetFileTime(C:\\FOXPROW\\Newfmmc\\fmmcshar.dbf) $PC7 = GetFileTime(C:\\FOXPROW\\Newfmmc\\fmctran.dbf) $PC8 = GetFileTime(C:\\FOXPROW\\Newfmmc\\hcb.dbf) $PC9 = GetFileTime(C:\\FOXPROW\\Newfmmc\\hcbshare.dbf) $PC10 = GetFileTime(C:\\FOXPROW\\Newfmmc\\hcbtran.cbf) If $PC1 = $Server1 then Edited June 17, 2004 by uznut Link to comment Share on other sites More sharing options...
Developers Jos Posted June 17, 2004 Developers Share Posted June 17, 2004 Try it with a single backslash... $Server1 = GetFileTime("S:\AdminShare\foxprow\fmmc.cdx") SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
uznut Posted June 17, 2004 Author Share Posted June 17, 2004 ill try that but i still need to compair them all then run something Link to comment Share on other sites More sharing options...
Developers Jos Posted June 17, 2004 Developers Share Posted June 17, 2004 untested ... just to give you an idea: $rc = FileCompareDate("S:\AdminShare\foxprow\fmmc.cdx"," C:\FOXPROW\Newfmmc\fmmc.cdx" ) Select Case $rc = 0 msgbox(0,"demo","File dates differ") Case $rc = 1 msgbox(0,"demo","File dates are equal") Case $rc = -1 msgbox(0,"demo","File1 not found") Case $rc = -2 msgbox(0,"demo","File2 not found") Case Else msgbox(0,"demo","dunno") EndSelect Func FileCompareDate($file1,$file2) $F1=FileGetTime($file1) if @error = 1 then Return(-1) ; $F2=FileGetTime($file2) if @error = 1 then Return(-2) ; $date1 = $f1[0] & $f1[1] & $f1[2] & $f1[3] & $f1[4] & $f1[5] $date2 = $f2[0] & $f2[1] & $f2[2] & $f2[3] & $f2[4] & $f2[5] if $date1 = $date2 Then Return(1) Else Return(0) EndIf EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
uznut Posted June 17, 2004 Author Share Posted June 17, 2004 ty yah a lot that works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now