ludo10 Posted March 14, 2006 Posted March 14, 2006 Hello, i have a folder in my temp directory, and i try to copy it to my program files directory.. without success ( DirCopy("C:\temp\notilus\Notilus Offine", "C:\Program Files\Notilus Offline", 1) i think that the problem come with the composed name of the folder... someone have an idea? best regards
Moderators big_daddy Posted March 14, 2006 Moderators Posted March 14, 2006 (edited) Try this and see what you get: $test = DirCopy("C:\temp\notilus\Notilus Offine", "C:\Program Files\Notilus Offline", 1) If $test == 1 Then MsgBox(0, "DirCopy", "Your file was successfully copied.") If $test == 0 Then MsgBox(0, "DirCopy", "There was an error while copying your file.") Edited March 14, 2006 by big_daddy
Uten Posted March 14, 2006 Posted March 14, 2006 Should work if you have permission to copy files in sourcdir and write in targetdir (and parent dirs) I did not get any errors or warnings if sourcedir does not exist, so maybee do a check? Regards Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
CyberSlug Posted March 14, 2006 Posted March 14, 2006 (edited) If some of the files in the directory are "in use", it would seem the copy would partially fail.For example, if I look at "C:\Documents and Settings\username\Local Settings\Temp" via Explorer and try to delete all the files in there: Most of the files are removed, but a few remain after a message ("Cannot delete ~DF3FED: Access is denied") pops up.If I try AutoIt's DirCopy function, it creates a new directory and copies over a few files--but not all files are copied.DirCopy("C:\Documents and Settings\username\Local Settings\Temp", "C:\Documents and Settings\username\Desktop\someNewFolder", 1)P.S. I cannot use Explorer to copy those "in use" files either. Edited March 14, 2006 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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