Filename with variable date appended

Advertisement

suncawy
Guest

Filename with variable date appended

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

Reply with quote

Advertisement

suncawy
Guest

Re: Filename with variable date appended

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 ?

Reply with quote

Advertisement

You can post new topics in this forum