Binary Code in a Variable

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Greg Greg 4 weeks ago.

  • Author
    Posts
  • #73615
    Profile photo of Greg
    Greg
    Participant

    Is it possible to load a variable array with binary code? In particular, I want to load profile photos into an array and assign them as needed. Thanks for any guidance.

  • #73618
    Profile photo of Curtis Smith
    Curtis Smith
    Participant

    Do you mean something like

    $Pictures = [System.IO.File]::ReadAllBytes("C:\Users\user1\Pictures\picture1.jpg"),
    [System.IO.File]::ReadAllBytes("C:\Users\user2\Pictures\picture2.jpg"),
    [System.IO.File]::ReadAllBytes("C:\Users\user3\Pictures\picture3.jpg")
    
  • #73967
    Profile photo of Greg
    Greg
    Participant

    @Curtis, that is exactly what I needed. Thank you!

You must be logged in to reply to this topic.