Jump to content

Trying to copy a folder


mbuk
 Share

Recommended Posts

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)

Link to comment
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)


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

Link to comment
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)

Link to comment
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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...