Decker87 Posted August 22, 2007 Posted August 22, 2007 (edited) Hi. I'm trying to use autoIT to copy a file from the local directory to the current user's Application Data folder.However, I don't know how to specify what this folder is!Also, I am having trouble with drive letters. How can I specify system folders, such as Program Files if I don't know for sure the drive letter?I also would like to know how to specify a directory in which you do not know the name, but know some other things. For example, a directory which you do not know its name, but know it is the only directory within its parent (and therefore the largest and the smallest, etc) Edited August 22, 2007 by Decker87
bj-kaiser Posted August 22, 2007 Posted August 22, 2007 RTFM:(AutoIt's Helpfile)Macro Reference...@AppDataDir - path to current user's Application Data ...@ProgramFilesDir - path to Program Files folder
Decker87 Posted August 22, 2007 Author Posted August 22, 2007 (edited) Gah! I'm so sorry I missed that! I must have been brain-dead at the time.But, I'm very confused now. What syntax do use with the macros?I am trying to use FileCopy to copy a file to the Common Files directory.FileCopy("file.dll", @CommonFilesDir+"\SPX\", 8)But it's just creating a new folder in the folder the script is run from! I searched all through the manual, and could not find a single example! Edited August 22, 2007 by Decker87
nmX.Memnoch Posted August 22, 2007 Posted August 22, 2007 (edited) You have to use '&' instead of '+':FileCopy(@ScriptDir & "\file.dll",@CommonFilesDir & "\SPX\",8)If that still doesn't work you can try this:DirCreate(@CommonFilesDir & "\SPX\")FileCopy(@ScriptDir & "\file.dll",@CommonFilesDir & "\SPX\") Edited August 22, 2007 by nmX.Memnoch
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now