home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
csso0301.zip
/
SAMPLES
/
FILE
/
FILES.CSS
Wrap
Cascading Style Sheet File
|
1998-02-09
|
1KB
|
34 lines
/* Copyright (c) 1998 IBK-Landquart-Switzerland. All rights reserved.
*
* Module : Files.css
* Application : Sample for several file functions in context
* Author : Peter Koch, IBK
*
* Date Description Who
* --------------------------------------------------------------------------
* Feb 1998 First release P.Koch, IBK
*/
#loadLibrary 'KcSysLib'
#loadLibrary 'KcFileLb'
main()
{
if (sizeof(mainArgVals) < 3)
throw '%%% usage: css files <filemask>';
var a = 2, tmp = fileTempName();
var rc = sysCommand('dir '+mainArgVals[a]+' /B >'+tmp+' 2>nul');
if (rc)
throw '%%% system error ('+rc+') querying file list';
var fh = fileOpen(tmp, fileOpenRead), cnt = 0;
while (!fileEof(fh)) {
var file = fileReadLine(fh);
if (file != '')
sysLog('file #' + ++cnt + ': ' + file);
}
sysLog();
sysLog('total '+cnt+' file(s)');
fileClose(fh);
fileDelete(tmp);
}