Topic "Filename with variable date appended"

Author Message
suncawy

Guest


Hi,

I have winscp 4.1.6 version and DO NOT have the console interface tool (winscp.com). On a monthly basis, I will need to download a file with the date appended to the end of the file. For example, "Myfile_Aug2009.sas7bdat" then the following month
"Myfile_Sep2009.sas7bdat", etc. How do I write a script where the month/year date will change ? The Javascript example on this site won't work since I don't have the console interface tool. Any help is much appreciated.

Here is what I have so far with the script, works great except that I would have to change the date each month:
option batch on
option confirm off
option transfer binary
open sftp://<userid>:<passwrd>@<session
get /apps/sas/datasets/data47/COSMC/GI/OutputData/Myfile_Aug2009.sas7bdat c:\temp
exit
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
suncawy

Guest


prikryl wrote:
Please read documentation. If that does not help, come back.


Okay, I went to the link and could not figure out the example and how it would apply. In particular, I couldn't get the session to connect properly and I don't have winscp.com. So, this area in the code is confusing:

// Session to connect to
var SESSION = "test@127.0.0.1";
// Path to winscp.com
var WINSCP = "c:\\program files\\winscp\\winscp.com";

Is there anything else ?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
suncawy wrote:
winscp.com

So go and download it.

Quote:
So, this area in the code is confusing:

What's is confusing about that? What do you miss/expect?
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License