Jump to content

Recommended Posts

Posted

first off i'm a auto/sciTE noob, b easy on me please.

k, been working on this script to copy an exe to a directory (and overwrite the original file)

i used the filecopy function FileCopy ( "source", "dest" [, flag] )

here is my script:

FileCopy("HDInspector.exe", "C:\program files\Hard Drive Inspector\HDInspector.exe" [, 1] )

this is what i get:

D:\wpi's\T3CH1N\WPI\Install\Hard Drive Management\HDD Inspector Pro 3.31.build.255\new.au3(1,85) : ERROR: syntax error

FileCopy("HDInspector.exe", "C:\program files\Hard Drive Inspector\HDInspector.exe" [

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

D:\wpi's\T3CH1N\WPI\Install\Hard Drive Management\HDD Inspector Pro 3.31.build.255\new.au3 - 1 error(s), 0 warning(s)

fyi, the target dir does exist.

i am guessing im just retarted and it's an obvious mistake on my part.

thanks all.

Posted (edited)

Remove The "["s

In the help file, "[]" means that the parameter is optional. When using it, you don't literally use the brackets.

Edited by darkjohn20
Posted

the brackets [ ] mean that the argument is optional.

you should not put in the code literally.

FileCopy("HDInspector.exe", "C:\program files\Hard Drive Inspector\HDInspector.exe" , 1)

or

FileCopy("HDInspector.exe", "C:\program files\Hard Drive Inspector\HDInspector.exe")

Posted

thank you so much, i guess i got confused by the instructions on the filecopy function. in the future should i omit all brackets i see in the function references?

thank you sososososo much for the prompt (instantaneous) response, you've made my night.

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