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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -