Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Simple concatenate problem
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Shay Levy [ MVP ]  
View profile  
 More options Jan 25 2009, 2:33 am
Newsgroups: microsoft.public.windows.powershell
From: Shay Levy [MVP] <n...@addre.ss>
Date: Sun, 25 Jan 2009 07:33:22 +0000 (UTC)
Local: Sun, Jan 25 2009 2:33 am
Subject: Re: Simple concatenate problem

copy-item -Path <network folder> -Destination "$env:AppData\Roaming\Microsoft"

---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar

> Could someone please suggest how I can concatenate an expanded
> environment variable with a string inside a cmdlet parameter?  I want
> to use the AppData environment variable contents and add some sub-
> folder specs to it as part of a Copy-Item destination parameter:

> copy-item -Path <network folder> -Destination env:AppData + "\Roaming
> \Microsoft"

> As you no doubt guessed, this is my first foray into Powershell.

> Thanks,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.