Hi
I'm trying to pass the name of a file to a variable but I get an error that the file cannot be found. However if I use the variable with the actual file name it works.
#$FileName = "Test-11-06-2014.xlsx"
$FileName = Get-ChildItem "C:\TEMP\Test*" | Select name
$FilePath = "C:\Temp\" + $FileName
$Title = $FileName.trim(".xlsx")
Thanks,