Jump to content

Recommended Posts

Posted

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!

Posted

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
Posted

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")

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
×
×
  • Create New...