Date: Wed, 19 Sep 2007 21:54:26 +0530
Reply-To: Shanks N <shanks.n@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Shanks N <shanks.n@GMAIL.COM>
Subject: Re: OT: How to make a file transfer automatic?
In-Reply-To: Arthur Tabachneck's message of "Tue\, 18 Sep 2007 19\:35\:02
-0400"
Content-Type: text/plain; charset=us-ascii
To add to what Arthur has said, you might want to look at 'expect' and
more specifically at 'autoexpect'. These tend to automate interactive
sessions especially when there is a different file involved every time
(subject to them being systematically different everytime)
I believe expect comes bundled with Tcl/Tk and a very good book on it
is Exploring Expect by Don Libes. There are versions for Unix and
Windows.
This might be a little more programming than you'd wished for, but I
believe the effort is worth it. Even the man pages of Expect have
decent examples of how it can be used.
regards,
Shanks
--
Arthur Tabachneck <art297@NETSCAPE.NET> writes:
> Duck-Hye,
>
> Does SSH provide command language access? If so, you could either simply
> put that code in a .bat file, or run it from SAS (possibly with an X
> command), and then include the line for running the SAS code.
>
> 'Scheduled tasks' will simply run the code, whichever you choose, at
> designated intervals. I posted some code on the list, about a month or so
> ago, which showed how one can include code in a .bat file to test file
> dates and sizes. By using the same approach in running the task as a .bat
> file, you can set up a loop to continue the process until the file is
> actually replaced.
>
> HTH,
> Art
> ----------
> On Tue, 18 Sep 2007 11:23:05 -0500, Duck-Hye Yang <dyang@CHAPINHALL.ORG>
> wrote:
>
>>Hello,
>>I'd like to schedule a file transfer at a set time, say every night
> (12AM).
>>I have an account on a Secure FTP server to transfer files.
>>Routinely I use 'SSH Secure File Transfer' to download files to my PC
> machine (operating on Windows-XP).
>>
>>I'd like to know how to make the transfer job automatic.
>>I've heard that I can use 'add scheduled task' from Control Panel.
> However, I realized that first of all I need to write a program.
>>
>>Thanks,
>>Duckhye
|