Copy multi files from a list to Linux Server
In my case, I'd like to copy files in a list to an SSH server. So I guess you want something like that. This is my batch file and it run well.
set WINSCP=D:\Softwares\winscp.com
set REMOTE_STRING=tiennd:password@techlinkvn.com
set REMOTE_FOLDER=/home/tiennd/MycelScrapy/
set SRC_LIST=README.md scrapy.cfg
@echo off & setlocal
setlocal EnableDelayedExpansion
set winscp_commands=
(for %%f in (%SRC_LIST%) do (
set winscp_commands=!winscp_commands! "put %%f %REMOTE_FOLDER%"
))
%WINSCP% %REMOTE_STRING% /command %WINSCP_COMMANDS% exit