ingenious_7 Posted October 6, 2006 Posted October 6, 2006 Hi, I am trying to create a login script for my network. I have most of it completed but I am having trouble with one part. I am trying to copy files from a network location to the current logged in users profile path and home directory. With a batch script it would be \\server\%username%. I have tried using the same method but with the @username macro but no luck. Can someone please help. I'm sure this must be possible!
daslick Posted October 6, 2006 Posted October 6, 2006 You may need to do something like \\server\" & @user
Helge Posted October 6, 2006 Posted October 6, 2006 Strings belong inside quotes, while macros don't like it as they then become a part of the string. So you need to separate them like this, using ampersands.$userpath = "\\server\" & @Username
ingenious_7 Posted October 6, 2006 Author Posted October 6, 2006 So if I want to use the FileCopy command will this work: FileCopy("\\192.168.1.202\" & @USERNAME & "\Profile\Program*.*", "C:\Documents And Settings\" & @USERNAME & "\Profile\Program")
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