powershell - Suffix to a variable -
i trying append suffix variable in order create path in powershell. let me clarify. $workingdirectory variable contains path c:\temp. however, use new-item command create item in path. item has called temp.csv. full path c:\temp\temp.csv.
new-item $workingdirectory\temp.csv -type file
would not work. overseeing basic syntax rule?
does know how fix problem? in advance!
you need put path in quotes work.
new-item "$workingdirectory\temp.csv" -type file
you can find out more escaping characters typing command in powershell console window
ps c:\> about_escaping_characters
Comments
Post a Comment