Is there an equivalent to the PathPart command?
  • Order of the Butterfly
    Order of the Butterfly
    ChrisH
    Posts: 165 from 2009/11/26
    Both AROS & OS4 have a really handy standard command called PathPart (which really should have been called AddPart). Does MorphOS come with an equivalent?
  • »09.01.13 - 13:16
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    ChrisH
    Posts: 165 from 2009/11/26
    Easiest to explain with some examples:
    > PathPart Foo:Bar Meef
    Foo:Bar/Meef

    > PathPart Foo:Bar/ Meef
    Foo:Bar/Meef

    > PathPart Foo: Meef
    Foo:Meef

    So basically it joins a path to a filename, taking to add (or not) a / in the middle as required.
  • »09.01.13 - 16:33
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    osco
    Posts: 680 from 2009/10/21
    From: Boston, USA
    Would a incarnate of "Lformat" work?
    Parameters: Dir = One or more directory name(s), Keys = Display keys, NoDates = Do not display dates, To = Destination file, Sub = Subdirectories included, Since = List files since date given, Upto = List files upto given date, Quick = Simple directory list, Block = List files in block sizes, NoHead = Do not display header lines, Files = Files only, Dirs = Directorys only, LFormat = Output list using this format string, All = All files.

    list ram:#?.ps lformat "foo.rexx *"%s%s*"" to bar.bat

    Sorry ignorance but onward
    Mac Mini 1.5GHz, 1G, 250G Drive, Apple Cinema Display, MorphOS 3.1 registered, MacOS 10 PowerBook (5,8) 1.67Hz, 2G, 80G Drive,........Waiting
    PowerBook (5,8) 1.67Hz, 2G, 40G MorphOS 3.1 unregisterd
  • »10.01.13 - 03:18
    Profile
  • MorphOS Developer
    itix
    Posts: 1514 from 2003/2/24
    From: Finland
    I think point is that PathPart handles different cases properly and most likely it is just an AddPart().

    This command is missing from MorphOS but it could be implemented to future versions.

    [ Edited by itix 10.01.2013 - 09:46 ]
    1 + 1 = 3 with very large values of 1
  • »10.01.13 - 07:45
    Profile