title: Using sqlcmd to capture the data from a remote server and putting the excel file in some other server
body: <p>I have used sqlcmd to capture the required data from a remote server ,which is coming fine .</p>
  
  <p>I have used the below query in a batch file -</p>
  
  <pre><code>&gt;&gt;"Output_hvac.xls" echo %date% %time%
  &gt;&gt;"Output_hvac.xls" SQLCMD ...
  </code></pre>
  
  <p>Now This batch file is kept on a local machine ,thus when it runs it produces an output _hvac excel file .</p>
  
  <p>I want that this excel file be stored in some other server which is not having sql server installed .The batch has to run on the local machine and the excel sheet to be updated on the server .Now I have access to the server but if i am trying to do this with the following query ,it shows access denied .</p>
  
  <pre><code>&gt;&gt;"//172......./d$/Output_hvac.xls" echo %date% %time%
      &gt;&gt;"Output_hvac.xls" SQLCMD ...
  </code></pre>
  
  <p>Now how would i do this .</p>