31
इस चर के साथ मैं इस पथ को कैसे जोड़ सकता हूं?नेटवर्क पथ + परिवर्तनीय
$file = "My file 01.txt" #The file name contains spaces
$readfile = gc "\\server01\folder01\" + ($file) #It doesn't work
धन्यवाद
इस चर के साथ मैं इस पथ को कैसे जोड़ सकता हूं?नेटवर्क पथ + परिवर्तनीय
$file = "My file 01.txt" #The file name contains spaces
$readfile = gc "\\server01\folder01\" + ($file) #It doesn't work
धन्यवाद
कई तरीकों से कर रहे हैं। सबसे सरल:
$readfile = gc \\server01\folder01\$file
आपका दृष्टिकोण करीब था:
$readfile = gc ("\\server01\folder01\" + $file)
तुम भी Join-Path उदा .:
$path = Join-Path \\server01\folder01 $file
$readfile = gc $path
उपयोग कर सकते हैं