\I have tried everything I can find on the web but I just can't make this work.... Really frustrating. All I want to do is to pass in a file name in the command line to my Powershell script test.ps1.
param([String]$input=$args[0])
$inputpath = 'C:\work\'
$inputfile = $($inputpath + $input+".txt")
I run the script like:
powershell .\test.ps1 "input"
However, the in the error message I print out, I keep getting "cannot find c:\work\.txt". Apparently my command line parameter isn't in there correctly. Can someone please help?