Sign in to follow this  
Followers 0
mbuk

Trying to copy a folder

4 posts in this topic

Hi, i'm trying to copy folder copy and it's contents to copy1 but it fails to copy . What am i diong wrong here?.

Thanks Andrew

Stext = InputBox("Source", "Please type in source and click OK","")

$Dtext = InputBox("Destination", "Please type in destination and click OK","")

If @error = 1 Then Exit

DirCopy($Stext& ":\copy", $Dtext& ":\:copy1", 1)

Share this post


Link to post
Share on other sites



$Stext = InputBox("Source", "Please type in source and click OK","")
$Dtext = InputBox("Destination", "Please type in destination and click OK","")
If @error = 1 Then Exit


DirCopy($Stext, $Dtext, 1)



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Let just say that I type in as source for example:

C:\Test

The script would then try to move C:\Test:\Copy , and as you can see this is not a valid folder. So first of all, this makes a whole lot more sense to me:

DirCopy($Stext,$Dtext, 1)

Second, you could, instead of a inputbox, use a FileOpenDialog. I'm not sure about this, just look it up in the helpfile, you might find it useful.

Last, use [autoit ] [/autoit ] tags for your code (leave out the spaces)

Share this post


Link to post
Share on other sites

Thanks for your help

Hi, i'm trying to copy folder copy and it's contents to copy1 but it fails to copy . What am i diong wrong here?.

Thanks Andrew

Stext = InputBox("Source", "Please type in source and click OK","")

$Dtext = InputBox("Destination", "Please type in destination and click OK","")

If @error = 1 Then Exit

DirCopy($Stext& ":\copy", $Dtext& ":\:copy1", 1)

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  
Followers 0