Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
125 user(s) are online (115 user(s) are browsing Forums)

Members: 1
Guests: 124

nbache, more...

Support us!

Headlines

 
  Register To Post  

Arexx with AmiFTP
Just can't stay away
Just can't stay away


See User information
Hello i am trying to make a small arexx program?delivering me the content of a remote directory

I

/* */
OPTIONS RESULTS
ADDRESS AMIFTP

GETATTR STEM fi. FILELIST /* Get information about folder */
(I used also GETATTR fi. FILELIST)
SAY fi.VERSION

Address COMMAND

SetEnv '.AFld.Ttl' fi.FILELIST.COUNT
SetEnv '.AFld.N1' fi.FILELIST.1.NAME
SetEnv '.AFld.S1' fi.FILELIST.1.SIZE
SetEnv '.AFld.T1' fi.FILELIST.1.TYPE

the environmental variables do contain FI.FILELIS.COUBNT etc
the SAY command delivers FI.VERSION

i am not aware of doing something wrong.

Any suggestion?

Thanks

Joseph

Go to top
Re: Arexx with AmiFTP
Not too shy to talk
Not too shy to talk


See User information
Hi Joseph,

@JosDuchIt
Quote:

JosDuchIt wrote:
Hello i am trying to make a small arexx program?delivering me the content of a remote directory

I've been using ARexx to control AmiFTP for a while with
good results... I extracted a bit of code and this seems
to work printing out a files list:
/*  test applet for AmiFTP
 */

/*  address AmiFTP
 */
address 'AMIFTP'

/*  Get file list
 */
GETATTR f FILELIST
 
/*  check list and print out files
 */
lc f.FileList.Count 1
if ~(lc 0then do
 
say 'No files found'
 
exit
end
else do
 do 
l=0 to lc
  say 
'   ' || f.FileList.l.Name
  say 
'      ' || f.FileList.l.Size
  say 
'      ' || f.FileList.l.Type
 end
end

Are you trying to set an Environment Variable
called ".AFld.Ttl" to the count of files? Maybe
the problem you're having is just getting the
contents of your Arexx variables out?

Instead of:
SetEnv '.AFld.Ttl'  fi.FILELIST.COUNT

You might try putting your whole command line into
into a variable and then using that:
cline 'SetEnv .AFld.Ttl " || fi.FILELIST.COUNT
 (cline)

Good luck,

PJS

Go to top
Re: Arexx with AmiFTP
Just can't stay away
Just can't stay away


See User information
@pjs


Hi, i did not notice your reply earlier.

The problem was really in how the stem variable was named . (something with the '?' dot.)
GETATTR STEM fi FILELIST //OK
GETATTR STEM fi. FILELIST // not OK
I copied this from a similar program using YAM.

In fact i am using the '.AFld.Ttl' environmental variables because they can easily be picked up with Gui4Cli in which i write more complicated programs.

Thanks for responding

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project