windows - Daily upload of file automation using batch script and WinSCP -


so have file generate weekly server using crontab in linux side , transfer pc. however, having problem when try send file generate different server on windows side using task scheduler.

your command-line syntax wrong.

i'm assuming \ftpbinverlog_%yyyy%-%mm%-%dd%.txt file, want download.

  • it won't work, if specify on command-line did.
  • also neither windows scheduler, nor command-interpreter, nor winscp understand syntax %yyyy%.
  • the path remote file not either. *nix systems use forward slashes, not backslashes.

so keep /script , /log arguments:

/script=c:\batchrun\binver\script.tmp /log="c:\bin verification\ftplog" 

and make sure script.tmp looks like:

open sftp://user@example.com /ftpbinverlog_%timestamp#yyyy-mm-dd%.txt c:\target_path\ exit 

references:


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -