2013-10-16 43 views
0

請查看以下命令以及語法錯誤是什麼?我想的DLL文件複製到我的項目bin目錄將文件複製到另一個目錄的命令

C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\10.0.0.0__b03f5f7f1 
1d50a3a>dir /s /b /o:gn 

C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\10.0.0.0__b03f5f7f1 
1d50a3a\Microsoft.ReportViewer.WinForms.dll 

C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WinForms\10.0.0.0__b03f5f7f1 
1d50a3a>copy Microsoft.ReportViewer.WinForms.dll C:\Documents and Settings\mural 
i.madhava\My Documents\Visual Studio 2008\Projects\Rdclrender\Rdclrender\bin 

The syntax of the command is incorrect. 
+0

你有一個解決方案,我只是想補充一點,你可以用雙渠所有文件名和路徑otes,甚至是短名。這使得它很容易記住 - 如果你總是使用雙引號,那麼它將起作用。這也包括像'cat&dog.txt'這樣的名字,它是一個簡短的名字,但由於'&'字符而不會引用而失敗。 – foxidrive

回答

1

很簡單,你需要將圍繞中有一個空間中的任何路徑報價:

副本Microsoft.ReportViewer.WinForms.dll「C:\ Documents和設置\ murali.madhava \我的文檔\ Visual Studio 2008的\項目\ Rdclrender \ Rdclrender \ BIN」

1

如果您有空格的路徑(如C:\Documents and Settings),你需要圍繞他們的報價,以阻止他們被當作多個參數:

copy blah.WinForms.dll "C:\Documents and Settings\blah\bin" 

這給你三個參數的命令:

  • copy
  • blah.WinForms.dll
  • C:\Documents and Settings\blah\bin

沒有引號,你得到的五參數命令這是你想要什麼:

  • copy
  • blah.WinForms.dll
  • C:\Documents
  • and
  • Settings\blah\bin
相關問題