Message Area
Casually read the BBS message area using an easy to use interface. Messages are categorized exactly like they are on the BBS. You may post new messages or reply to existing messages!

You are not logged in. Login here for full access privileges.

Previous Message | Next Message | Back to Pascal  <--  <--- Return to Home Page
   Networked Database  Pascal   [113 / 155] RSS
 From   To   Subject   Date/Time 
Message   Ozz Nixon    Ignatius   file_id.diz extraction function   December 31, 2017
 11:36 PM *  

Hello Ignatius.

I redesigned, this should work (may have a typo) but should show you the flaw.

 I> --begin--

function DizExists(const fn:astr):boolean;
var
   T:Text;
   S:string;

begin
   star('Checking for description...'#29);
   S:='';
   if (pos('.zip',fn)<>0) then S:='unzip -L -o '
   else if (pos('.lzh',fn)<>0) then S:='lha e f '
   else if (pos('.arj',fn)<>0) then S:='arj e f '
   else if (pos('.rar',fn)<>0) then S:='unrar x -cl ';
   If (S<>'') then begin
      fpsystem(S+' file_id.diz '+         general.temppath+cstr(node)+'/ARC/
>/dev/null');
      If (exist('/home/rg/TEMP'+cstr(node)+'/ARC/file_id.diz')) then begin
         assign(T,'/home/rg/TEMP'+cstr(node)+'/ARC/file_id.diz');
         {$I-} reset(T); {$I+}
         if (IOResult<>0) then exit;
         star('Importing description.');
         While not EOF(T) do begin
            {$I-} Readln(T,S); {$I+}
            If IOResult=0 then {do something with S!!};
         End;
         erase(T);
      end;
   End;
 I> --end--

So where it says: {do something with S!!} use "S" for whatever you need for
your BBS code. You should also handle "FILE_ID.DIZ" (uppercase) too.

Let me know if you need any help...
Ozz

--- GoldED+/W32 1.1.4.7
 * Origin:  Home of Exchange BBS (QBBS Clone) and Rhenium Mailer  (1:275/301)
  Show ANSI Codes | Hide BBCodes | Show Color Codes | Hide Encoding | Hide HTML Tags | Show Routing
Previous Message | Next Message | Back to Pascal  <--  <--- Return to Home Page

VADV-PHP
Execution Time: 0.0824 seconds

If you experience any problems with this website or need help, contact the webmaster.
VADV-PHP Copyright © 2002-2024 Steve Winn, Aspect Technologies. All Rights Reserved.
Virtual Advanced Copyright © 1995-1997 Roland De Graaf.
v2.0.140505

Warning: Unknown: open(c:\Sessions\sess_iihiombi87oavkqst0cpc613b1, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0 PHP Warning: session_start(): open(c:\Sessions\sess_iihiombi87oavkqst0cpc613b1, O_RDWR) failed: No such file or directory (2) in D:\wc5\http\public\VADV\include\common.inc.php on line 45 PHP Warning: Unknown: open(c:\Sessions\sess_iihiombi87oavkqst0cpc613b1, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (c:\Sessions) in Unknown on line 0