locked
Use * in path variables RRS feed

  • Question

  • Hi,

    I need to create a script that will copy files from specific folders and run it on a local computer. New updates of softwares are coming every month and I need to create a script that will copy file regardless of the name. If I have file somefile-2-3-0-x86.msi is it possible or how to copy that file by looking only on first 3-4 letters and not the whole file. 

    Something like this

    $file = '\\location of the file\company\IT\filename*'

    On this way I don't care about the whole file name, because first letters are always the same. On this way I will not get error when running Invoke-Expresson



    • Edited by Quantum5 Thursday, May 23, 2019 10:10 AM
    Thursday, May 23, 2019 10:08 AM

All replies