HFC Posted May 19, 2008 Share Posted May 19, 2008 Hello! I'm trying to copy a file from a location on our file server to the 'Documents and Settings' folder on a PC. Here is the script I'm using: FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\%username%\test\", 1) The script grabs the needed file and copies it into the C:\Documents and Settings\%username% folder instead of the user logged on. Is there another variable I should be using instead of %username%? Thanks in advance! Link to comment Share on other sites More sharing options...
Developers Jos Posted May 19, 2008 Developers Share Posted May 19, 2008 (edited) Try: FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\" & @Username & "\test\", 1) Edited May 19, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
HFC Posted May 19, 2008 Author Share Posted May 19, 2008 Try: FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\" & @Username & "\test\", 1) That worked, Thank You! -d 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