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
/apps/document/2013-11-08
For day 2013-11-09 a directory will be created below
/apps/document/2013-11-09
For day 2013-11-10 a directory will be created below
/apps/document/2013-11-10

This is my code currently

sftp-commands.txt

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

transfer.bat

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

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

Louis
1111

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

By RSS:

Answers

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

Tags:

×45
×29
×5
×3

Asked: Nov 22 '13 at 03:13

Seen: 2,708 times

Last updated: Nov 22 '13 at 03:13

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