Jump to content
Sign in to follow this  
ludo10

Dircopy .. i dont understand :o(

Recommended Posts

ludo10

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

Share this post


Link to post
Share on other sites
big_daddy

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 by big_daddy

Share this post


Link to post
Share on other sites
Uten

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

Share this post


Link to post
Share on other sites
CyberSlug

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 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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.