Jump to content

looking for a little help on a "simple" script.


Recommended Posts

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.

Link to comment
Share on other sites

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")

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Yes, no brackets are needed. EVER.

Unless you're using arrays, but as Alton Brown says "That's another show."

:(

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...