maniootek Posted March 30, 2015 Share Posted March 30, 2015 (edited) When I try to move file named "testfile.txt" from directory1 (source) to directory2 (destination) with function FileMove then sometimes It will copy that file to new directory2 but leave old file in direcotry1 changing it's name to "testfile (1).txt" instead of deleting it. Other time it will also success to copy to new directory2 but leave two source files "testfile.txt" and "testfile (1).txt" in destination1. In both cases function FileMove returned success. I am not sure but maybe it is caused by syncing that files by google drive pc app during filemove process. I will change destination1 to another folder which will not be synced with google drive to see if it will fix the problem but anyway I am curious why FileMove still returned success? Shouldn't it check if source file still exist before it return success? Is there any UDF or something to detect all errors which might occur during file move like: - check if destination2 exists - check if destination2 has enought free space - check if source file has been deleted successfully without leaving any copy of that file - check if source file is not used by another process Any idea? comments? suggestions? Edited March 30, 2015 by maniootek Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2015 Share Posted March 30, 2015 Depends on the flag you use and the attributes of the files used. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
maniootek Posted March 30, 2015 Author Share Posted March 30, 2015 Depends on the flag you use and the attributes of the files used. I use "$FC_OVERWRITE (1)" and "$FC_CREATEPATH (8)" flag Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2015 Share Posted March 30, 2015 I use "$FC_OVERWRITE (1)" and "$FC_CREATEPATH (8)" flag Lovely. Show reproducer code, I'll be happy to test. Because Filemove has never ever failed me where the function is used properly and my expectations are correct. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
maniootek Posted March 30, 2015 Author Share Posted March 30, 2015 If you say that this function never failed for you then I will do more research about it. Maybe there's something else what cause this problem. Link to comment Share on other sites More sharing options...
JohnOne Posted March 30, 2015 Share Posted March 30, 2015 Keep in mind the files attributes and the locations. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
alienclone Posted March 31, 2015 Share Posted March 31, 2015 I have the same problem when moving or deleting files in Google Drive folders that are synced between 2 computers, usually if i wait then the two computers sync up correctly and the leftover files get deleted. If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2015 Share Posted March 31, 2015 Perhaps _FileInUse UDF (Iv'e seen it around the forum) can help here. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
maniootek Posted March 31, 2015 Author Share Posted March 31, 2015 I just did first try to process FileMove function without directory used by Google Drive and everything goes fine. I will leave it but I still suggest that FileMove should not return success when did not delete source file properly. Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2015 Share Posted March 31, 2015 Agreed. But it is simple enough to deal with yourself for nor now. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted March 31, 2015 Share Posted March 31, 2015 By the way. if you feel this is a bug, you can open a bug ticket here. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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