Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

how to use wild card with variable in powershell

$
0
0

HI

i am trying to use wild card with variable but getting an error message, "You cannot call a method on a null-valued expression."

$src = 'C:\Temp'

$TabletzipPath = $src + "tab*.zip"

i would like to copy the tablet zip file which is placed in in $src to be copied in $TabletzipPath.

i am using tab* because this file name changes continuously. so if i give a fix name for example tablet1.zip than it works fine.






Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>