none
Accessing elements of an Array RRS feed

  • Question

  • What's wrong with this piece of code? I don't know what I am missing but it doesn't work for me.

    I want to access the name of any file, one by one.

    Please, help me.

    #####################################

    Set-Location d:\temp
    $myarray = Get-ChildItem -Path .\*.log | Format-Table Name 
    $myarray[2]

    #######################################

    Tuesday, August 6, 2013 8:30 PM

Answers

All replies