Jump to content
Sign in to follow this  
HFC

Script Help Using FileCopy

Recommended Posts

HFC

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!

Share this post


Link to post
Share on other sites
Jos

Try:

FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\" & @Username & "\test\", 1)
:) Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
HFC

Try:

FileCopy ("\\MyServer\path\*.xml", "C:\Documents and Settings\" & @Username & "\test\", 1)
:)
That worked, Thank You!

-d

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  

×