Get files Based on date what you want (SFTP connection)
Good day Winscp Supports,
I want to copy a file from the server based on date user inserted
this is the script I used but all files will get not the the date I input:
this is the .bat file to call the winscp script:
@echo off
:main
echo Inputdate(YYYYMMDD)
set /p car=
if %car% == 1 goto date
mkdir "C:\Documents and Settings\asd\Desktop\%car%"
WinSCP.com /script=sample.txt
pause
And this is the winscp script:
option batch abort
option confirm off
open sftp://username:password@Ip ADd -hostkey="ssh-rsa 2048 c5:89:02:bd:ce:66:ec:18:e2:10:b6:40:2f:81:a0:a6"
get -filemask="*>=%TIMESTAMP#yyyy-mm-dd%" /media/4B90C3C70BA785A7/melvin.luching C:\SMARTVISTA\%car%
exit
I want to copy a file from the server based on date user inserted
this is the script I used but all files will get not the the date I input:
this is the .bat file to call the winscp script:
@echo off
:main
echo Inputdate(YYYYMMDD)
set /p car=
if %car% == 1 goto date
mkdir "C:\Documents and Settings\asd\Desktop\%car%"
WinSCP.com /script=sample.txt
pause
And this is the winscp script:
option batch abort
option confirm off
open sftp://username:password@Ip ADd -hostkey="ssh-rsa 2048 c5:89:02:bd:ce:66:ec:18:e2:10:b6:40:2f:81:a0:a6"
get -filemask="*>=%TIMESTAMP#yyyy-mm-dd%" /media/4B90C3C70BA785A7/melvin.luching C:\SMARTVISTA\%car%
exit