Moreno Posted October 16, 2007 Share Posted October 16, 2007 Hi, everybody! I´m from Brazil and I am really new using Autoit3. Actually, I began testing it today. I´m trying to make a tool to backup files from local computers to a server computer at my work, but of course I am doing something wrong. I need the user to type its LOGIN to populate a variable and send the variable to the command "Filecopy" in the path. Could anybody help me please? Thanks Moreno heres my script: -------------------------------------------------------------------------------------------------------------------- ;Creating a variable Dim $userlogin ;populate a variable with the userlogin $login = InputBox("LOGIN", "Enter your login do backup your files to the server.", "", "") ;Copying local files to the server FileCopy("D:\users\"$userlogin"\Desktop\*.*", "\\comput1-backup1\Backup1", 1) FileCopy("D:\users\"$userlogin"\My documents\*.*", "\\comput1-backup1\Backup1", 1) MsgBox(4096, "Check your files in the server (\\comput1-backup1\Backup1) with your credentials. Any question call...., 10) Link to comment Share on other sites More sharing options...
DjDeep00 Posted October 16, 2007 Share Posted October 16, 2007 (edited) Welcome to Autoit You dont need to dim $userlogin. This should be like this $userlogin = InputBox("LOGIN", "Enter your login do backup your files to the server.", "", "") $userlogin = InputBox("LOGIN", "Enter your login do backup your files to the server.", "", "") ;Copying local files to the server FileCopy("D:\users\" & $userlogin & "\Desktop\*.*", "\\comput1-backup1\Backup1", 1) FileCopy("D:\users\" & $userlogin & "\My documents\*.*", "\\comput1-backup1\Backup1", 1) MsgBox(4096,"", "Check your files in the server (\\comput1-backup1\Backup1) with your credentials. Any question call...., 10") Edited October 16, 2007 by DjDeep00 Link to comment Share on other sites More sharing options...
Brickoneer Posted October 16, 2007 Share Posted October 16, 2007 (edited) [edit] eh, DjDeep00 beat me to it. Edited October 16, 2007 by Brickoneer Link to comment Share on other sites More sharing options...
Moreno Posted October 16, 2007 Author Share Posted October 16, 2007 Ok, DjDeep00 thanks for your help. I will try it now. Have a good day! Moreno -------------------------------------- Welcome to Autoit You dont need to dim $userlogin. This should be like this $userlogin = InputBox("LOGIN", "Enter your login do backup your files to the server.", "", "") $userlogin = InputBox("LOGIN", "Enter your login do backup your files to the server.", "", "") ;Copying local files to the server FileCopy("D:\users\" & $userlogin & "\Desktop\*.*", "\\comput1-backup1\Backup1", 1) FileCopy("D:\users\" & $userlogin & "\My documents\*.*", "\\comput1-backup1\Backup1", 1) MsgBox(4096,"", "Check your files in the server (\\comput1-backup1\Backup1) with your credentials. Any question call...., 10") Link to comment Share on other sites More sharing options...
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