Sign in to follow this  
Followers 0
bestfreeware

FileMove doesn't work

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0