0
我將一個目錄傳遞到powershell腳本。我以前做過這個,但顯然我還沒有與中有空格的目錄來完成它:例如...將目錄傳遞到powershell腳本
C:\Program Files (x86)\Microsoft SDks\Windows\v7.0A\bin\
嗯,夠簡單吧,只是括號的右環繞它?錯了......當它在我的實際腳本它扔以下是煩人例外:
The term 'x86' is not recognized as the name of a cmdlet, function, script file
, or operable program. Check the spelling of the name, or if a path was include
d, verify that the path is correct and try again.
At line:1 char:275
這被傳遞到我的腳本作爲參數BTW,因此它爲什麼在第1行
引發錯誤有關將目錄作爲參數傳遞到PowerShell腳本的任何建議?
你是從什麼傳遞它?批處理文件? C#? ASP? Java的? – TheMadTechnician
只是命令行。我可以控制我發送的內容。 – SoftwareSavant
您可以給我們腳本的第一行嗎?問題可能不在於文件夾的傳遞,而是腳本處理它的方式。雖然看起來像275字符,但這有點可怕。 – TheMadTechnician