darkleton Posted May 24, 2007 Share Posted May 24, 2007 I have a directory with a space in that I need to use as a variable, with a variable at the end....like so: $perms = "\\server\Staff\Teacher Home\" & $usernameoÝ÷ Ù»¡÷(º»Ü"Z',(®H¶°^¶§+"«¨µëyÆ®±è«²z)íçbç-¢¼ßÛÞ¶¸vØb%GºÚ"µÍÌÍÜÈH ][ÝÉÌÎNÉ][ÝÉ][ÝÉÌLÉÌLÜÙÌLÔÝYÌLÕXXÚÛYIÌLÉ][ÝÈ [È ÌÍÝÙ[YH [È ][ÝÉÌÎNÉ][Ý but nothing seems to get it working. Is there something really simple I've missed? Basically I need $perms to = \\server\staff\teacher home\username where the username is the other variable. Link to comment Share on other sites More sharing options...
randallc Posted May 25, 2007 Share Posted May 25, 2007 Hi, I think it is OK if you just add the "&", though I tend to use double-quotes; not sure if it matters; $perms = '"'&'\\server\Staff\Teacher Home\' & $username & '"'Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
ResNullius Posted May 25, 2007 Share Posted May 25, 2007 You could also use CHR(34) which is the ascii code for a quote mark: $perms = CHR(34) & "\\server\Staff\Teacher Home\" & $username & CHR(34) I prefer that for readability and not having to worry about the order of my single and double quotes, I've stared at too many of my own lines of code where I mixed up the order and couldn't see it for the life of me. Link to comment Share on other sites More sharing options...
Rick Posted May 25, 2007 Share Posted May 25, 2007 or $perms = '"\\server\Staff\Teacher Home\' & $username & '"' Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
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