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:
date <nul >~datetime.txt
for /f "eol=E tokens=5-9 delims=/ " %%i in (~datetime.txt) do (
WinSCP.exe /console /parameter timestamp /command "open sftp://exchange:firstname.lastname@example.org:22" "mkdir %1%"
Please, what have I wrong? Thank you in advance for help.