bestfreeware Posted January 19, 2011 Share Posted January 19, 2011 Everyday I export data some data (sending some keystrokes) and then store them into a YYYY.MM.DD directory. The sendkey works but FileMove doesn't whereas it just follows the send instruction. Why (below the whole script): #include<Date.au3> Opt("WinTitleMatchMode", 2) ;1=complete, 2=quick $title = WinGetHandle("Data Export Utility") If $title = 0 Then MsgBox(0,"Not Found", "The window title specified was not found!") Else $date = @YEAR & "." & @MON & "." & @MDAY WinActivate($title) WinWaitActive($title) Send("^x") WinWaitActive("Signal") Send("{ENTER}") FileMove("C:\export\files\*", "C:\export\files\" & $date & "\*",8) EndIf Link to comment Share on other sites More sharing options...
Varian Posted January 19, 2011 Share Posted January 19, 2011 Are no files being moved? Maybe put it in a loop since the stock return does not give much help. Do Local $Move = FileMove("C:\export\files\*", "C:\export\files\" & $date & "\*", 8) Sleep(10) Until $Move Link to comment Share on other sites More sharing options...
kylomas Posted January 19, 2011 Share Posted January 19, 2011 bestfreeware, should this not be: FileMove("C:\export\files\*.*", "C:\export\files\" & $date & "\*.*",8) kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill 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