Last active
December 24, 2015 12:03
-
-
Save khairulhasanmd/9627668a73454fa2d7e8 to your computer and use it in GitHub Desktop.
Use winscp to copy linux directory to windows.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this script must run on linux | |
# Automatically abort script on errors | |
option batch abort | |
# Disable overwrite confirmations that conflict with the previous | |
option confirm off | |
# Connect to SFTP server using a password | |
open sftp://user:[email protected]/ -hostkey="ssh-rsa 2048 33:33:33:73:88:33:30:53:ef:33:66:33:66:33:33:33" | |
# Download File | |
cd /home/user/Desktop/folderToCopy/ | |
lcd D:\folder\folder\folder\ | |
get * | |
# put | |
# Disconnect | |
close | |
# to copy local(windows) dir to linux | |
# put D:\folder\folder\folder\ /home/user/Desktop/folderToCopy/ | |
# Disconnect | |
# close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment