title: Command Prompt - Getting "File not found" error while uploading a file using batch file
body: <p>I am learning batch script and trying to upload a file on specific location using batch file but it is not uploading the file.</p>
  
  <pre><code>#!/bin/bash
  SET HOST=xx.xx.x.x
  SET USER=xxxxx
  SET PASSWD=xxxxx
  SET FILE='C:\Batch\post.txt'
  SET PATH='/home/Test1/'
  
  ftp -n %HOST% 
  quote %USER%
  quote %$PASSWD%
  binary
  put %FILE%
  quit
  exit 0
  </code></pre>
  
  <p>When I executes put command manually, it is throwing "file not found" error.</p>
  
  <p>Please help me to find missing parameter.</p>
  
  <p>many thanks in advance</p>
  
  <h2>EDIT</h2>
  
  <p>After changing scripts as below , I m getting login error</p>
  
  <pre><code>#!/bin/bash
  SET HOST=xx.xx.x.x
  SET USER=xxxxx
  SET PASSWD=xxxxx
  SET "FILE=C:\Batch\post.txt"
  
  (
  echo quote %USER%
  echo quote %$PASSWD%
  echo binary
  echo put %FILE%
  echo quit
  ) | ftp -n %HOST% 
  </code></pre>
  
  <blockquote>
    <p>Please login with USER and PASS.  Command line to send Please login
    with USER and PASS.  Please login with USER and PASS.  Please login
    with USER and PASS.</p>
  </blockquote>