rosaz 0 Posted July 15, 2010 Hello, I am having trouble with getting Filemove to work. I want to upload each file in a folder, and then move it to a different folder. The rest of the code works, but the Filemove part simply doesn't do anything: #include <IE.au3> #Include <File.au3> Dim $array $oIE = _IEAttach ("Website Title", "WindowTitle") $array = _FileListToArray("C:\Folder1\") For $file in $array If StringIsDigit($file) = 0 Then _IELinkClickByText($oIE, "Upload" ) _IELoadWait ($oIE) $oSubmit = _IEGetObjByName ($oIE, "Input File") MouseMove(_IEPropertyGet($oSubmit, "screenx") + _IEPropertyGet($oSubmit, "width") - 10, _ _IEPropertyGet($oSubmit, "screeny") + _IEPropertyGet($oSubmit, "height")/2) MouseClick("left") WinWait("Choose File to Upload") $hChoose = WinGetHandle("Choose File to Upload") ControlSetText($hChoose, "", "Edit1", $file) ControlClick($hChoose, "", "Button1") $ok = _IEGetObjByName ($oIE, "OK") _IEAction($ok, "click") _IELoadWait ($oIE) fileMove($file, StringReplace($file, "Folder1", "Folder2"), 8) EndIf Next Thank you! Share this post Link to post Share on other sites
PsaltyDS 39 Posted July 15, 2010 The results from _FileListToArray() are only file names without the directory path. You probably need the full path to the file for FileMove(). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites