Jump to content

Script Help Using FileCopy


Recommended Posts

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

  • Developers

Try:

FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\" & @Username & "\test\", 1)
:) Edited 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...