Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted

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

Posted

Hi again

FileCopy("X:\install\Enterprise Architect - Corporate Floating Edition\CD\EA Licenses\sskeys.dat", "C:\EA Licenses\", 9)

Cheers

This doesn't work still

It somehow doesn't copy. it only copies over the folder itself

Posted

This doesn't work still

It somehow doesn't copy. it only copies over the folder itself

ok it works now. but with slight error still

thanks all! its because of a slight keyword error :)

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
×
×
  • Create New...