login about faq

Hi, I am trying to automate a process whereby my sftpg3 scheduled task would access a folder dynamically and retrieve file which is generated by date daily. Currently I am able to retrieve the files but I would like to retrieve them dynamically.

Directory Structure of server:
For day 2013-11-08, a directory will be created below
For day 2013-11-09 a directory will be created below
For day 2013-11-10 a directory will be created below

This is my code currently


    cd /apps/document/2013-11-08 
    lcd C:\Users\testuser\desktop
    get *


    @echo off
    sftpg3.exe --password=xxx -B sftp-commands.txt xxx@xx.xx.xx.xx

I would like my sftp-commands.txt to dynamically find the date today and search the correct folder to retrieve the files
Any advice given will be greatly appreciated.

asked Nov 22 '13 at 03:13

Louis's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 22 '13 at 03:13

Seen: 3,806 times

Last updated: Nov 22 '13 at 03:13

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.