Hangar.La tienda de software del Amiga

ksc_FullName

Get the 'full name' of a file

Short:        Get the 'full name' of a file
Author:       Kyzer/CSG
Uploader:     Kyzer/CSG <kyzer 4u net>
Type:         util/batch
Architecture: m68k-amigaos

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@4u.net> or see the website at http://zap.to/kyz  *
****************************************************************************

Gratis

Web del proyecto ↗

Descargar 3 KB

Desde el Amiga: abre Hangar y busca ksc_FullName.

AutorKyzer/CSG
Categoríautil/batch
Tamaño3 KB
Param68k-amigaos
OrigenAminet