Sign in to follow this  
Followers 0
Adam12

need help with something that should be simple - Dircopy

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You probably want:

DirCopy ( @ScriptDir &"\Test", @DesktopDir & "\test" ,1)
Edited 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.

Share this post


Link to post
Share on other sites

Thanks! I knew it was prob something simple

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0