Skip to content

Instantly share code, notes, and snippets.

@handong1587
Created July 29, 2016 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save handong1587/1f367ae3dfdb91f0ec4490a75459cb7c to your computer and use it in GitHub Desktop.
Save handong1587/1f367ae3dfdb91f0ec4490a75459cb7c to your computer and use it in GitHub Desktop.
cd /path/to/ncftp/ncftp-3.2.5/bin
local_dir=/path/to/local
pwd
for folder in `ls $local_dir`
do
echo "$local_dir/$folder"
./ncftpput -R -v -u yourusername -p yourpassword yourftpsite path/to/remote/ $local_dir/$folder
# sleep 5 seconds to avoid disconnect timeout
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment