ARexx (73/81)

From:Dave Clarke
Date:7 Jun 2001 at 11:36:02
Subject:Re: How do I check files exist and are the same?

Once upon a time, 07-Jun-01 20:02:05, Brian Scott spoke thus about
'[arexx] Re: How do I check files exist and are the same?':

>Hello Andrew

>Here's something to play with for checking sizes..

>devinfo='T:devinfo'
>dev='DF1:' /* device being checked */

>ADDRESS command ('info >'devinfo dev) /* standard ADOS info command */

>CALL open('r',devinfo,'r');dinfo=readch('r',300);CALL close('r')

>parse var dinfo . (dev) size used free full errs status name .

>say "size:"size "used:"used "free:"free "full:"full "errs:"errs
>"status:"status "name:"name

Unfortunately that doesn't cover files or dirs and uses an external command,
(yuck! :)

Use the ARexx function 'exists' to check if a file/dir exists and the
rexxsupport.library function 'statef' to get the info on the file/dir.

'statef' returns:
type size block bits day min tick comment

Dave



_--_|\ Dave Clarke | Four Wheel Drive: - Helps you get stuck |
/ \ | faster, harder, further from help.|
\_.--.*/ <-Melbourne | Powered by: A3000 '060/50+604/180 138MB |
v 4wddjc@goconnect.net| P-IV/Concierto/Pablo/Paloma |


I drove past Chicago on my way to OS/2 ...

ARexx mailing list - No flames, no overquoting, no crossposting.
Unsub: Blank mail to mailto:arexx-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/