Jump to content

Eric Chang

Members
  • Posts

    5
  • Joined

  • Last visited

Eric Chang's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. 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)
  2. Dear All I try to use AUTOIT to fetch the last modified time of some files But with this code , I got nothing output with var $t , $t1 the c:\erp\pbd.txt does exists and contain correct datas . and I do not know what`s wrong ? Please help , thanks . #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) $i=$i+1 WEnd FileClose($file)
  3. I had already use pstools for years. and I am really wondering how do you make pstools to solve this problem .
  4. I have almost the same trouble now . I need to fill the Computer Descriptionevery single Computer in my Office. I know how & where to change the registry key , But I dont want manually fill all computers so I make a table which mapping the Computer Name & Comptuer Decription like Com_Name Com_Desc AAA AAA03 BBB BBB02 CCC CCC15 But I have no idea how to do this automation. In my formulation , I try to load the mapping file , and get the hostname from WinXP Variables to determine com_DEsc in the mapping file . yes, I can read the file , I can get the %hostname% , But I dont know how to match the Com_name in the file , Could anybody kindly help me ?
  5. I have almost the same trouble now . I need to fill the Computer Descriptionevery single Computer in my Office. I know how & where to change the registry key , But I dont want manually fill all computers so I make a table which mapping the Computer Name & Comptuer Decription like Com_Name Com_Desc AAA AAA03 BBB BBB02 CCC CCC15 But I have no idea how to do this automation. In my formulation , I try to load the mapping file , and get the hostname from WinXP Variables to determine com_DEsc in the mapping file . yes, I can read the file , I can get the %hostname% , But I dont know how to match the Com_name in the file , Could anybody kindly help me ?
×
×
  • Create New...