View Single Post
Old 10-18-2007   #4 (permalink)
Brandon Shell [MVP]


 
 

Re: Getting Copy-Item to display messages (like the old COPY command i

While I agree... copy-item should have -noclobber switch.. it is easy to add
with test-path

Get-childitem | foreach{if(!(test-path $destination\$($_.Name)){copy-item $_
$destination\$_.Name -verbose}}

I dont understand the other things you dont like... I would like to know
more. Do you think you could clarify your frustration?

"Bob Landau" <BobLandau@xxxxxx> wrote in message
news:87E163FE-2B8E-4C6D-A4BE-7D0E382ACCFA@xxxxxx
Quote:

> This is currently my biggest complaint about Powershell; with the
> awkwardness
> of using the Get-ChildItem cmdlet to query/sort for file properties being
> 2nd; and Powershell's gratuitously providing you with _any_ non-existant
> (of
> your choice) Property which then will evaluate to NULL being the 3rd
>
> I have not found an equivalent to what you want Copy-Item -verbose will
> merely tell you that you've overwritten a "precious" file _after_ the
> fact.
> -Confirm will ask you to validate the request regardless of whether there
> is
> a file to overwrite.
>
> Powershell has given us all the tools but for every day useage there needs
> to be some additional functionalithy that provides us non-*nix's with the
> safety and convience most of us are use to.
>
> "Marc Scheuner" wrote:
>
Quote:

>> Folks,
>>
>> I really enjoy PowerShell, and its power - but sometimes, things are a
>> bit irritating - like the fact that teh Copy-Item command doesn't seem
>> to display messages about what it's doing at all. You never get any
>> feedback printed on the standard out console to let you know that a
>> file has indeed been copied.....
>>
>> Any way to turn that on?? I didn't find any mention of it in the "man
>> pages" as far as I can tell.....
>>
>> Thanks!
>> Marc
>>
My System SpecsSystem Spec