Angelo Messina Active Member Licensed User Longtime User Oct 30, 2019 #1 Hello everyone, I have to wait for a copy of a file to finish before continuing I thank you for the help you have always given me
Hello everyone, I have to wait for a copy of a file to finish before continuing I thank you for the help you have always given me
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2019 #2 File.Copy is a blocking / synchronous method. Code: File.Copy(...) Log("This line will run after the file was copied") If you are copying large files then you should use File.CopyAsync together with Wait For. Upvote 0
File.Copy is a blocking / synchronous method. Code: File.Copy(...) Log("This line will run after the file was copied") If you are copying large files then you should use File.CopyAsync together with Wait For.
Angelo Messina Active Member Licensed User Longtime User Oct 30, 2019 #3 Then : File.Copy (Dir ..., File) Wait for what Upvote 0
Angelo Messina Active Member Licensed User Longtime User Oct 30, 2019 #4 Wait For Copy_Ready Upvote 0
Angelo Messina Active Member Licensed User Longtime User Oct 30, 2019 #5 here's what happens to me: I take a picture Code: Dim NumProv As Long = AssegnoRiferimento + 1 ' Assegno momentaneamente il numero che prederà il rifornimento File.Copy(PicturesFolder, Img,Comodo.PATHFOTO,"img_"&NumProv&".jpg") File.Delete(PicturesFolder, Img) copy the photo but does not cancel from PicturesFolder and switch to the sub Activity_Resume Upvote 0
here's what happens to me: I take a picture Code: Dim NumProv As Long = AssegnoRiferimento + 1 ' Assegno momentaneamente il numero che prederà il rifornimento File.Copy(PicturesFolder, Img,Comodo.PATHFOTO,"img_"&NumProv&".jpg") File.Delete(PicturesFolder, Img) copy the photo but does not cancel from PicturesFolder and switch to the sub Activity_Resume
Erel B4X founder Staff member Licensed User Longtime User Oct 30, 2019 #6 The answer to your question was given in post #2. You don't need to (and can't) use Wait For with File.Copy. Check it with: Code: File.Copy(PicturesFolder, Img,Comodo.PATHFOTO,"img_"&NumProv&".jpg") Log("Success?: " & File.Delete(PicturesFolder, Img)) Log(File.Exist(PicturesFolder, Img)) Upvote 0
The answer to your question was given in post #2. You don't need to (and can't) use Wait For with File.Copy. Check it with: Code: File.Copy(PicturesFolder, Img,Comodo.PATHFOTO,"img_"&NumProv&".jpg") Log("Success?: " & File.Delete(PicturesFolder, Img)) Log(File.Exist(PicturesFolder, Img))