Subject: | |
From: | |
Reply To: | |
Date: | Fri, 26 May 2000 01:02:35 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 1:24 AM -0400 5/26/00, [log in to unmask] wrote:
>...Ultimately, I'd like to set up a command that
>looks roughly like this:
>
> :IF FINFO(<localfilename>,"EOF") <> FINFO(<remotefilename>,"EOF") THEN
>COMPLAIN
>
>The part that is being elusive, of course, is specifying the name of a file
>on a remote system...
How about something like this...
1) :remote file remeof;dev=#disc
2) :remote echo !![finfo('remfile','eof')] > *remeof
:input remote_eof < remeof
3) :if finfo('locfile','eof') <> !remote_eof
: xeq complain.cmd
:endif
Notes:
1) On the remote, ";dev=#disc" says "use the 'host' disc, not my local disc"
2) The double-bang "!!" is deliberate. The first ! gets eaten by the
local CI, and then the second one is passed to the remote.
3) Although the finfo call on the remote returns an integer, once it's
echoed to a file (and input into a variable) it becomes text. The ! in
the "if" statement turns it back into an integer.
Hope this helps...
Barry Lake [log in to unmask]
Allegro Consultants, Inc. www.allegro.com
(408)252-2330
|
|
|