Adam12 Posted March 7, 2006 Posted March 7, 2006 OK I have been tryin for a couple hours now to write a script that will copy a folder fro my flash drive to the desktop of the current user. I think I must be missing something simple. I am trying to use @ScriptDir because as I plug my flash drive in different computers the Drive letter is not always the same so I can't use something like : DirCopy ( "g:\Test", ""& @HomeDrive & @HomePath &"\Desktop\Test" ,1 ) this is what I have tried DirCopy ( ""& @ScriptDir &"\Test", ""& @HomeDrive & @HomePath &"\Desktop\Test" ,1 ) DirCopy ( ""& @workingdir &"\Test", ""& @HomeDrive & @HomePath &"\Desktop\Test" ,1 ) does anyone know what I am doing wrong? the test folder is in the root of my flash drive.
Stumpii Posted March 7, 2006 Posted March 7, 2006 (edited) You probably want: DirCopy ( @ScriptDir &"\Test", @DesktopDir & "\test" ,1) Edited March 7, 2006 by Stumpii Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.
MHz Posted March 7, 2006 Posted March 7, 2006 @Adam12 You were fail with inserting a backslash between @HomeDrive and @HomePath, as Macro's do not end with a trailing backslash. Stumpii has the best method.
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