Jump to content

DirCopy Script does not work (file share)


Go to solution Solved by ad777,

Recommended Posts

Hello, I am new to AutoIt and I am trying to create a script whic copies a folder from a file share server (for example: \\testShare01\folders\folderToCopy) to my local drive (for example: C:\folders\folderDestination)

My script looks like this:

DirCopy("\foldertoCopy", "C:\folders\folderDestination)

I compile the script to a .exe which I will copy into the folder itself. The reason why I do it like this is, that I have file Servers all around the world, so if I am in Amsterdam I do not want to copy the whole folder from Kopenhagen, the reasons for that are obvious I think. Normally I have used a xcopy script for this, which could be found in the file Server folder itself:

(xcopy /s /i %~dp0folderToCopy C:\folders\folderDestination)

Since I want to create a GUI and some other stuff with AutoIt I chose to change my scripts to AutoIt. But I am already failing at the simple DirCopy function... could you help me? I guess %~dp0folderToCopy does not work in AutoIt?

Best regards

 

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