Gene Posted February 3, 2005 Share Posted February 3, 2005 (edited) I'm using the 1/30/2005 version of AutoIt3 and running Win2K Pro, sp4.MsgBox(4096, "Move data", $sSourcePath & "\" & $aFiles2Move[$i] & " To " & $sDestPath & "\" & $sNewName & "."& $sExt & ".jpg", 0) $iError = FileMove ( $sSourcePath & "\" & $aFiles2Move[$i], $sDestPath & "\" & $sNewName & "."& $sExt & ".jpg" , 0 ) The code above produces the following result...The MsgBox shows:K:\_JPG\050202\010.jpg To K:\_JPG\Renamed\20050203-154918.005.jpgThe FileMove command fails and the next lines of code If $iError < 1 Then _FileWriteLog($sSourcePath & "\" & "ErrorList.TXT", $sSourcePath & "\" & $aFiles2Move[$i] & " to " & $sDestPath & "\" & $sNewName & "."& $sExt & ".jpg" ) $iErrorCount = $iErrorCount + 1 EndIf writes an entry to the error log.2005-02-03 15:50:23 : K:\_JPG\050202\010.jpg to K:\_JPG\Renamed\20050203-154918.005.jpg The Source and Destination paths are correct, the destination file name is generated on the fly, the 3 digits between the two periods are incremented as needed to deal with multiple moves/renames in a given second.Can anyone tell me what is wrong with my code?Edit: H'mmmn, a smart Alec (like me) might say yes and nothing further. I hope to get the reason too. Edited February 3, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
this-is-me Posted February 3, 2005 Share Posted February 3, 2005 Perhaps you need the overwrite flag? Who else would I be? Link to comment Share on other sites More sharing options...
Gene Posted February 3, 2005 Author Share Posted February 3, 2005 Perhaps you need the overwrite flag?<{POST_SNAPBACK}>On your suggestion, I tried that with no change in result. You couldn't know it, but the destination file name is based on the current time at the point of MOVE. The destination folder is currently empty. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
SlimShady Posted February 3, 2005 Share Posted February 3, 2005 What was your problem again? Does the file not move? It could be a bug, but I won't jump to that conclusion now. Link to comment Share on other sites More sharing options...
Gene Posted February 3, 2005 Author Share Posted February 3, 2005 (edited) What was your problem again?Does the file not move?It could be a bug, but I won't jump to that conclusion now.<{POST_SNAPBACK}>The file does not move, whether or not the destination is in the same folder, or different folders.Edit: I also am hesitant to consider a problem to be a bug. Edited February 3, 2005 by Gene [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... 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