AminetAminet
Search:
82494 packages online
About
Recent
Browse
Search
Upload
Setup
Services

util/batch/ksc_FullName.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Get the 'full name' of a file
Author:Kyzer/CSG
Uploader:Kyzer/CSG <kyzer 4u net>
Type:util/batch
Architecture:m68k-amigaos
Date:2000-02-22
Download:http://aminet.net/util/batch/ksc_FullName.lha - View contents
Readme:http://aminet.net/util/batch/ksc_FullName.readme
Downloads:405
This prints the 'full name' of a file - that is, the name and the full path
to  it.  It  can also 'quote' the filename both for spaces and double quote
characters - often a problem in scripts - and for pattern characters, which
are a problem when passing a filename to a program that uses wildcards.

Usage: FullName [NOQUOTES] [NOPATS] <filename>

Simply  run  FullName  with  a filename. It will print out the full, quoted
name  which  contains  no  literal  spaces,  quotes or wildcard characters.
You're more likely to use it in a script with backticks: for example

.key file/f
rx REXX:DeliPlay.rexx `fullname noquotes <file>`

- Add  the  option NOQUOTES to turn off all quoting - for when the filename
  is used with programs that don't use standard argument parsing.
- Add  the  option  NOPATS to turn off quoting pattern characters, for when
  the filename is used with programs that don't use wildcards.

Source code:

For the first time, a KSC util is written in C - why? Well, firstly because
I'm  too  lazy  to write that quoting routine in assembler, and secondly to
experiment  with  getting  'small  output'  from the VBCC compiler. It's an
entirely  self contained main() function with no external library bases and
no  data  hunk.  It's really quite small for a C program at 752 bytes. Mind
you,  looking  at  the  output,  I could shave at least 40 bytes off it, so
maybe the next version of this will be assembler ;)

Requires 2.0 or better.

****************************************************************************
*          THIS PROGRAM IS PART OF THE "KYZER'S SMALLS" COLLECTION         *
*           The KyzSmlClxn is a set of small yet useful commands.          *
*                                                                          *
*       Commands are installed by copying them to your C: directory.       *
*     Source is included, and is licensed under the GNU GPL version 2.     *
*                                                                          *
*  Email Kyzer/CSG <kyzer at 4u.net> or see the website at http://zap.to/kyz  *
****************************************************************************


Contents of util/batch/ksc_FullName.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                  538     752  71.5% -lh5- 7899 Feb 21  2000 FullName
[generic]                 1281    3119  41.1% -lh5- 9cd6 Feb 21  2000 FullName.c
[generic]                 1041    2264  46.0% -lh5- 9fa2 Feb 21  2000 FullName.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         3 files    2860    6135  46.6%            Feb 22  2000

Aminet © 1992-2018 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>