Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

want to copy to docs & settings\USER\etc.... 1

Status
Not open for further replies.

dotobi

Technical User
Mar 9, 2004
229
HK
Hi

I want to copy a file to a users c:\Documents & Settings\USER'S FOLDER\Etc... in the logon script.

Using %USERNAME% works well until there's a user that already existed locally on the computer before it was added to the domain. In this case, the docs & settings folder contains a username.domain folder, rather than just simply username.

This is how the copy command is at the moment:
Code:
xcopy /d /y "sourcefile" "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Word\STARTUP\"
Is there a %users docs & settings folder% command?

Thanks
 
Actually

Is there a list of %% commands that are available (e.g. %USERNAME% %COMPUTERNAME% ETC...)

Thanks
 
THANKS!

%USERPROFILE% did the trick :)
 
to be exact:
Code:
xcopy /d /y "sourcefile" "%USERPROFILE%\Application Data\Microsoft\Word\STARTUP"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top