Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Filename with variable date appended

suncawy wrote:

winscp.com

So go and download it.

So, this area in the code is confusing:

What's is confusing about that? What do you miss/expect?
suncawy

Re: Filename with variable date appended

martin 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

Re: Filename with variable date appended

Please read documentation. If that does not help, come back.
suncawy

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