Actions to files and drawers name
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Hello,

    i would like to do a new tool with Hollywood.

    Many actions are very long to do in a Ambient lister.

    - rename many files from 'azerty' to 'Azerty' for example
    - rename many files from 'AZERTY' to 'Azerty' for example
    - grab lister to a file
    - add prefix or suffix to drawer or file
    ...

    Maybe this sort of tool already exists ?
    If not, don't hesitate to do suggestions for others actions to files and drawers name
  • »04.09.24 - 12:18
    Profile Visit Website
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2096 from 2003/2/24
    From: po-RNO
    Quote:

    Papiosaur wrote:
    - rename many files from 'azerty' to 'Azerty' for example
    - rename many files from 'AZERTY' to 'Azerty' for example


    Wasn't MultiRen popular back in the day? Maybe it could do this?


    Quote:

    - grab lister to a file

    What do you mean? Get filenames from a lister? Get all other properties too? Selected filenames can be copied to clipboard with the copyselectiontoclipboard internal Ambient command at least.


    Quote:

    - add prefix or suffix to drawer or file

    This is easy with Ambient already. Just select files you want to rename, select Rename (from menu or button), set source to *, and prefix to prefix.* or suffix to *.suffix.
  • »04.09.24 - 20:59
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Quote:

    jPV a écrit :
    Wasn't MultiRen popular back in the day? Maybe it could do this?

    Maybe i will try it

    Quote:

    What do you mean? Get filenames from a lister? Get all other properties too? Selected filenames can be copied to clipboard with the copyselectiontoclipboard internal Ambient command at least.

    Obtain the list of file and drawer names from a lister in a file. With Ambient i get only one name not a list.

    Quote:

    This is easy with Ambient already. Just select files you want to rename, select Rename (from menu or button), set source to *, and prefix to prefix.* or suffix to *.suffix.

    I didn't know Amient could do that this Rename button... Thanks :-)
  • »05.09.24 - 06:27
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1513 from 2012/11/10
    From: Manchester, UK/GB
    @ jPV - That is handy :-D . . . but when did the asterisk (*) have the gaul to become an "Amiga" wildcard ! 8-)

    If you want, at a later time/date, to remove the prefix or the suffix, can this be achieved as easily using Rename?
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »08.09.24 - 07:11
    Profile
  • Moderator
    Kronos
    Posts: 2323 from 2003/2/24
    Quote:

    NewSense wrote:
    but when did the asterisk (*) have the gaul to become an "Amiga" wildcard ! 8-)




    MorphOS_1.0 would be my guess, but it might have already been a thing with AOS3.5/9.
  • »08.09.24 - 07:13
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Quote:

    NewSense a écrit :
    If you want, at a later time/date, to remove the prefix or the suffix, can this be achieved as easily using Rename?

    Rename yourprefix.* to * do the job normally, same thing for the suffix: rename *.yoursuffix to *
  • »08.09.24 - 08:39
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1513 from 2012/11/10
    From: Manchester, UK/GB
    Quote:

    NewSense wrote: but when did the asterisk (*) have the gaul to become an "Amiga" wildcard ! 8-)

    Quote:

    Kronos wrote: MorphOS_1.0 would be my guess, but it might have already been a thing with AOS3.5/9.
    I don't remember asterisks being introduced as wildcards in OS3.5 or OS3.9 - with or without the BoingBags!

    There was certainly no mention of the use of anything as wildcards IIRC (nevermind other than HASH (#) and QuestionMarks (?), as there had been from day 1 of the Amiga DOS . . . AFAIK), and I certainly don't remember any mention of using asterisk(s) as wildcards being in the limited docs either IIRC? :-?

    I had a quick look through the HTML docs for OS3.9 and there is no mention of asterisk(s) in there - for any reason that I could find!

    I always thought asterisk(s) use was generally a PC usage when used as a wildcard! I'm not complaining, but I feel like I've been a mushroom for several years if they'd been adopted for use early on in MorphOS, as I never knew about their usage until now! However, a quick search for their use in MorphOS did not reveal the mention of the use of asterisk(s) in the MorphOS Library. There is mention of PC Wildcard - Pattern Matching, but I don't see in the list on that page in the MorphOS library that asterisk(s) are now "de rigueur", as accepted as their use is accustomed to being used in the PC domain!
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »08.09.24 - 09:59
    Profile
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    Quote:

    NewSense wrote:
    when did the asterisk (*) have the gaul to become an "Amiga" wildcard ! 8-)


    This became an option in AmigaOS 2.0 (V36). It can be enabled at dos.library level by setting RNF_WILDSTAR flag in DOSBase->dl_Root->rn_Flags.

    Various tools are available to toggle this flag runtime, for example:
    https://aminet.net/package/util/boot/WildStar
    https://aminet.net/package/util/cli/wstar

    MorphOS enables this bit by default since a very long time.

    [ Edited by Piru 08.09.2024 - 21:01 ]
  • »08.09.24 - 17:56
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1513 from 2012/11/10
    From: Manchester, UK/GB
    Quote:

    Piru wrote: This became an option in AmigaOS 2.0 (V36). It can be enabled at dos.library level by setting RNF_WILDSTAR flag in DOSBase->dl_Root->rn_Flags.
    So, is it enabled by default in Amiga Workbench from v2.0 or higher? If so, it's being "flying under the radar" for many years in reality it seems! Though from what you state it seems it's a flag that has to be specifically set to have it enabled, which it also seems it is not set in Workbench v2.0 or higher by default, or do you know differently?
    Quote:

    Piru wrote: Various tools are available to toggle this flag runtime, for example:
    https://aminet.net/package/util/boot/WildStar
    https://aminet.net/package/util/cli/wstar
    These seem to be individual utilities that are not part of Workbench, and I feel sure there was never any fully adopted implemented use in Workbench to utilise the asterisk(s) as wildcards, or have you other information to support your comment with relation to Workbench specifically from version 2.0?
    Quote:

    Piru wrote: MorphOS enables this bit by default since a very long time.
    That maybe so, but where is it documented that it was/is supported, and not only that but mentioned that use of an asterisk(s) is as much a wildcard as using "#?" as the well established Amiga option? :-?

    I looked in the MorphOS Library, and I couldn't find a mention of the use of asterisk(s) in MorphOS as wildcard(s), or is there some mention of them in there that I could not find, or is it documented somewhere else, such as the SDK?

    Maybe this already included feature needs some actual or better documenting in the MorphOS support systems, be that the guide, Help, Library or elsewhere to make this long-standing but seemingly basically hidden feature actually available as open-knowledge to any and all MorphOS users? 8-D
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »08.09.24 - 23:21
    Profile
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2096 from 2003/2/24
    From: po-RNO
    Quote:

    NewSense wrote:
    @ jPV - That is handy :-D . . . but when did the asterisk (*) have the gaul to become an "Amiga" wildcard ! 8-)

    As Ambient is highly inspired by DOpus5, this feature is also copied directly from it. I guess DOpus5 developers didn't want to have too complex rename patterns, and to keep things a bit simplier they chose this dummy wildcard from other platforms instead of the more versatile wildcard solution from Amiga.


    Here's what DOpus5.guide tells:

    A limited type of wildcard rename is possible. Entering an '*' in the
    bottom field allows you to add prefixes or suffixes. For instance, entering
    '*.pic' will add a '.pic' suffix to all selected entries. Entering 'A*'
    will add an A prefix. Only one '*' may be used in this process.

    You cannot give a file a name that contains a '*'.

    If you enter an '*' in the top as well as the bottom field, you can replace
    sections of the name. For example, entering '*.pic' in the top Field and
    '*.iff' in the bottom Field will replace the '.pic' suffix in that entry
    that has one with a '.iff' suffix. If an entry does not have a '.pic'
    suffix, it will be left untouched. The * may also be embedded. For
    instance, renaming 'FOO*BAZ' as 'GEE*WIZ' would rename 'FOOBARBAZ' to
    'GEEBARWIZ'. Again, only one '*' may be used in each of the string fields.


    Quote:

    If you want, at a later time/date, to remove the prefix or the suffix, can this be achieved as easily using Rename?

    Yes!
  • »09.09.24 - 16:49
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    NewSense
    Posts: 1513 from 2012/11/10
    From: Manchester, UK/GB
    @ jPV - as usual, you've been very helpful in explaining this asterisk wildcard's likely place of origin (DOpus), and use in MorphOS. 8-D

    In reality I still don't think that it was ever implemented directly in Workbench, even though that was considered to be where it originated from what Kronos suggested, though Harry (Piru) stated it seems to have been part of MorphOS from a very early stage of development, probably because it had been found to be so useful. Though I think that it's far more logical, and likely, that it's original use in earlier versions of DOpus was where it was first implemented in Workbench replacement mode such as DOpus Magellan, and considered worthy of adding its feature into MorphOS as it got developed in those early days . . . and subsequently got lost in time for many as it seems it never got documented as such in MorphOS, at least that's how it seems to have ended up, until now, to me.

    It may also be handy to have the relevant usage information added to the 'Pattern Matching' section of the MorphOS Library so this thread's relevance in this regard does not get buried, and forgotten again, amongst all the other topics that get discussed here in this forum. This has been an interesting side-topic from the original thread, and I am grateful to you all that contributed in this thread for allowing this information to get aired for others to benefit from too. 8-)
    MacMini 1.5GHz,64MB VRAM, PowerBooks A1138/9 (Model 5,8/9),PowerMac G5 2.3GHz(DP), iMac A1145 2.1GHz 20", all with MorphOS v3.18+,Airport,Bluetooth,A1016 Keyboard,T-RB22 Mouse,DVD-RW-DL,MiniMax,Firewire/USB2 & MacOSX 10.4/5
  • »10.09.24 - 03:24
    Profile