idle 0 Posted December 22, 2003 I have made a script which moves some files from one dir to another, and checks the errorcode. It works om my win2k machine, but when I was testing it on a win95 machine it failed to delete the file. I don't have a win95 machine mysqlf, so maybe someone could check if and see if its a bug? FileCopy("c:\dir1\*.ted", "c:\dir2\*.*",1) If @error = 0 then FileDelete("*.ted") Endif Share this post Link to post Share on other sites
scriptkitty 1 Posted December 22, 2003 (edited) FileCopy("c:\dir1\*.ted", "c:\dir2\*.*",1) If @error = 0 then FileDelete("*.ted") Endif should it be?: FileCopy("c:\dir1\*.ted", "c:\dir2\*.*",1) If @error = 0 then FileDelete("c:\dir1\*.ted") Endif it might have been that the file was not executed in c:\dir1\ It worked fine on my Win95 machine. Edited December 22, 2003 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites
sykes 0 Posted December 23, 2003 As posted by JdeB on 12/8/03:Just wanted to share with you that the filecopy returns its "returncode" into a variable .. not into @ERROR..You are correct that Filecopy doesn't return a 1 if theres nothing to copy...don't know why.....thats for the developers to answer. We have enough youth. How about a fountain of SMART? Share this post Link to post Share on other sites
idle 0 Posted December 23, 2003 should it be?: FileCopy("c:\dir1\*.ted", "c:\dir2\*.*",1) If @error = 0 then FileDelete("c:\dir1\*.ted") EndifYou're right... Its me who have made a mastake. I just haven't seen it, as the files in in the same dir on the machine on which i'm testing it... Share this post Link to post Share on other sites