Client Write up and Programming
« Interactive and search files »

Welcome Guest. Please Login or Register.
Dec 24, 2009, 11:13am




Client Write up and Programming :: THEOS Multi-User Basic :: Multi-User Basic (or THEOS OS questions) :: Interactive and search files
   [Search This Thread][Reply] [Send Topic To Friend] [Print]
 AuthorTopic: Interactive and search files (Read 115 times)
maslow
New Member
*
member is offline





Joined: Sept 2008
Gender: Male
Posts: 1
 Interactive and search files
« Thread Started on Nov 11, 2008, 7:59am »
[Quote]

I'm trying to take care of a theos basic program as it's designer is retiring, how do I start something in interactive mode and how do I search a directory for a specific word or string?

The actual production program is in 4.1, I have a box that is supposed to have a running version of it for my development, but it appears to be in corona so things are different and I can't get the program to run. It says error 255, and I think the guy cleaned all the data files off of it before he handed it over, so that might be the problem.
Link to Post - Back to Top  IP: Logged
Fbugg
Guest
 Re: Interactive and search files
« Reply #1 on Nov 11, 2008, 8:08pm »
[Quote]

Although I got a copy of Corona years ago, I still have 4.0-4.2 on the clients I deal with.

Typically from a basic program a filelist is initiated by:
CSI "F[ilelist] "&path&filename.filetype (or libraryname.librarytype.filename)

For example
if you are searching for company.file lets say in the main directory of the account you are in
CSI "F Company.File"

if you are using subdirectories, it might be something like
CSI "F /CompFLS/Company.File"

Now remember that CSI closes all open files, so if you have files open before doing this, you may need to reopen them.

If you are doing it with variables,
FINAME$="Company.File"
Pth$="/CompFLS/"
DRV$=":S"
CSI " "&PTH$&FINAME$&DRV$

There is also a shell command available like most other basics, so that could be used, or develop an EXEC program to do the file list and call that from the basic program. EXEC commands are a little different so you should use HELP EXEC and any manuals you have
to familiarize yourself with that.

Hope that helps

Buff
Link to Post - Back to Top  IP: Logged
buff2
Guest
 Re: Interactive and search files
« Reply #2 on Nov 11, 2008, 8:10pm »
[Quote]

The library reference should read Libraryname.Filename.membername

Sorry for not stating it correctly
Link to Post - Back to Top  IP: Logged
buff2
Guest
 Re: Interactive and search files
« Reply #3 on Nov 14, 2008, 4:04pm »
[Quote]

You could also send it to a file. Easiest way is to use the built-in
Filelist options.
CSI "F "&FINAME$&"."&FITYPE$&" (FILE FT"

This will put the files that match FINAME$.FITYPE$ into a file called
Selected.files. The FT tells it to stop at the file type with no more information. If it's a library You can use MN instead of FT to stop at the member name. You can then open selected.files and read the entries there (as I recall use LINPUT rather than READ).
Link to Post - Back to Top  IP: Logged
   [Search This Thread][Reply] [Send Topic To Friend] [Print]

Google
Webbuffs.proboards.com
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!