خرید بک لینک

Is there a way to use a variable whose value contains the colon character as a filename string in a command-line redirect? Powershell always treats the colon as a drive separator, regardless of escape characters. How can this be done using the colon as a character literal contained in the output filename?

Example:

$colonVar = "Colon:string" echo "fileContents" > "file$colonVar.txt"

yields

Caot find drive. A drive with the name 'fileColon' does not exist.

Can we instead write "fileContents" to a file named "fileColon:string.txt"?

I have not been successful using any combination of single or double quotation marks, escape characters, parentheses, or dollar sign and parentheses in the string value or the redirect string. The portion of the string after the colon is always treated as a drive.

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 12 فروردين 1395 ساعت: 3:09

صفحه بندی