Passing local parameter to remote session
Dear friend,
Please help me with such a problem: I want to pass a variable stored current date to my remote session and create there new folder with the name of that variable (e.g. 20140611). I tried some combination, mostly got an error "Missing parameter for the command mkdir". The last version of my batch script is:
@ECHO OFF
cls
date <nul >~datetime.txt
for /f "eol=E tokens=5-9 delims=/ " %%i in (~datetime.txt) do (
set month=%%j
set day=%%k
set year=%%l
)
set timestamp=%year%%month%%day%
WinSCP.exe /console /parameter timestamp /command "open sftp://exchange:ut9k3cm0@10.213.114.3:22" "mkdir %1%"
Please, what have I wrong? Thank you in advance for help.
Please help me with such a problem: I want to pass a variable stored current date to my remote session and create there new folder with the name of that variable (e.g. 20140611). I tried some combination, mostly got an error "Missing parameter for the command mkdir". The last version of my batch script is:
@ECHO OFF
cls
date <nul >~datetime.txt
for /f "eol=E tokens=5-9 delims=/ " %%i in (~datetime.txt) do (
set month=%%j
set day=%%k
set year=%%l
)
set timestamp=%year%%month%%day%
WinSCP.exe /console /parameter timestamp /command "open sftp://exchange:ut9k3cm0@10.213.114.3:22" "mkdir %1%"
Please, what have I wrong? Thank you in advance for help.