Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.os2.programmer.misc > #247

RMDIR

From "A.D. Fundum" <what.ever@neverm.ind>
Message-ID <o8uYFJ3iqTdG-pn2-eHQlxNxG5r0b@localhost> (permalink)
Newsgroups comp.os.os2.programmer.misc
Subject RMDIR
Organization News-Service.com
Date 2011-05-17 09:04 +0200

Show all headers | View raw


Along the lines of FPos/Iconomize, I just want to mention other 
possible byte-savers here: remove working directories from OS path 
targets, e.g. E.EXE or VIEW.EXE. Better suggestion, typically saving 
at least a few kilobytes, occuring more frequently and without any 
negative speed penalty: remove working directories set to the same 
full path as the app, assuming that's a superfluous setting 
(installers setting this to the same directory as the *.EXE's full 
path, a.o.: DFSee, eCS (a.o. Mahjongg, Mozilla, Netscape), 
Entertainment Pack for OS/2, FM/2, HomePage Publisher, and so on).

In working Rexx pseudo-code, obviously not changing any EAs nor 
*.INI-files:


/* NOP.CMD */

/* Settings, Strip() and Translate() aren't required here */ 
exe=Strip(Translate('D:\MY\TEST\TRIAL.EXE'))
parameters=Strip('-foo -bar [Hello?] "%*" %* **')
workdir=Strip(Translate('D:\MY\TEST'))

/* Get the full path of the executable-line */
exepath=FileSpec('D',exe)||FileSpec('P',exe)

/* Compare the workdir (with an appended "\") with the exe's path */ 
IF workdir||'\'==exepath THEN DO
   olddir=workdir
   workdir=''
END

/* Output new settings */
SAY 'Exe:' exe
SAY 'Arg:' parameters
SAY 'Dir:' workdir
IF workdir='' THEN SAY 'Removed dir-line:' olddir 

EXIT


--

Back to comp.os.os2.programmer.misc | Previous | Next | Find similar


Thread

RMDIR "A.D. Fundum" <what.ever@neverm.ind> - 2011-05-17 09:04 +0200

csiph-web