Copy file from server to local machine

duderoo

Expert Member
Joined
Jun 7, 2005
Messages
3,380
Reaction score
241
Location
Earth
I need to a copy a file from the server which I have placed in the netlogon folder to all users on my network. I use the following placed in the logon script but it ain't working

xcopy \\server\netlogon\file.ini C:\Documents and Settings\%username%\Local Settings\Application Data\xxxxxxxx\xxxxxxx\file.ini

it says invalid number of parameters
 
You're doing it wrong :)

The reason it's throwing that error is because you cannot have spaces in folder paths in a command line program, because it sees every word seperated by a space as a seperate argument.

Use "xcopy \\server\netlogon\file.ini C:\Documents%20and%20Settings\%username%\Local%20Settings\Application%20Data\xxxxxxxx\xxxxxxx\file.ini"

(Without the space between the S and the e in the word settings..)
 
I did that but it now created a totally new Documents and settings etc, rather than dumping the file in the current documents and settings folder.

Also how to I force it just to copy the file and overwrite it all the time.
 
Top
Sign up to the MyBroadband newsletter
X