I am running a script which has $FileName variable containing the absolute path with spaces. Due to the space within the directory name and file name, the script fails to executes without finding the actual path. All I need is to add $FilePath within double quotes. How should I append double quotes in the beginning and end of a string?
For example
"X:MoviesFile OneFile One.txt"
Script:
$FilePath = Join-Path $Path $($Dir + "" + $File + “.txt”)
$FilePath
Current OutPut:
X:MoviesFile OneFile One.txt
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…