Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Read File with Backtick in Name

$
0
0

Summary: Read the content of a text file with a backtick ( ` ) in the name.

Hey, Scripting Guy! Question How can I use Windows PowerShell to read the content of a file that has a backtick ( ` ) in the file name?

Hey, Scripting Guy! Answer Use single quotation marks around the name when you supply the path to Get-Content, for example:

Get-Content 'c:\fso\a file with a `in the name.txt'

The following examples fail:

Get-Content "c:\fso\a file with a `in the name.txt"

Get-Content c:\fso\a file with a `in the name.txt


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>