Jump to content

Filecopy .dat file to Local Drive


halocast
 Share

Recommended Posts

Hi, i am very new to scripting with autoit.

i am currently using Autoit v3 stable version to script

I got a problem that i hope u guys can help me with

i have written this line of code

-----------------------------------

Dircreate("C:\EA Licences")

sleep(50)

filecopy("X:\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licenses\sskeys", "C:\EA Licenses", 1)

sleep(150)

----------------------------------

Basically what i want to do is i create a folder called "EA Licenses" in my C:\

Then copy the file from my mapped drive to this folder.

However only the CREATE part works. The file doesn't get copied over. am i doing something wrong here?

Edited by halocast
Link to comment
Share on other sites

Is "sskeys" a directory or a file without an extension? I'll assume it's a directory containinng your .dat file

FileCopy("X:\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licenses\sskeys\*.dat", "C:\EA Licenses\sskeys\", 9)
By using "9" ( 1 + 8) instead of "1" for the last parameter will create destination directory if doesn't already exist and will also overwrite any existing file if it does already exist.

Cheers

Edited by smashly
Link to comment
Share on other sites

Is "sskeys" a directory or a file without an extension? I'll assume it's a directory containinng your .dat file

FileCopy("X:\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licenses\sskeys\*.dat", "C:\EA Licenses\sskeys\", 9)
By using "9" ( 1 + 8) instead of "1" for the last parameter will create destination directory if doesn't already exist and will also overwrite any existing file if it does already exist.

Cheers

sorry forgot to mention

sskey is the file i want to copy over

it is "sskeys.dat" file

i can't seem to copy this over to my C:\EA Licenses folder that i have create with the script

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