wildcards in rename()?

Discussion in 'C Programming' started by Alvaro Puente, Jul 14, 2003.

  1. Hi all!

    Do any of you know if wildcards are accepted when calling rename()
    function?

    Thanks/Alvaro
    Alvaro Puente, Jul 14, 2003
    #1
    1. Advertising

  2. Alvaro Puente <> scribbled the following:
    > Hi all!


    > Do any of you know if wildcards are accepted when calling rename()
    > function?


    I'm not sure about this, but I think the ISO C standard does not
    guarantee any wildcard support whatsoever. Your own implementation might
    provide some but that'll be off-topic here.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "You can pick your friends, you can pick your nose, but you can't pick your
    relatives."
    - MAD Magazine
    Joona I Palaste, Jul 14, 2003
    #2
    1. Advertising

  3. On Mon, 14 Jul 2003 10:34:42 +0200, Alvaro Puente wrote:
    > Hi all!
    >
    > Do any of you know if wildcards are accepted when calling rename()
    > function?


    no.

    --
    main(int c,char*k,char*s){c>0?main(0,"adceoX$_k6][^hn","-7\
    0#05&'40$.6'+).3+1%30"),puts(""):*s?c=!c?-*s:(putchar(45),c
    ),putchar(main(c,k+=*s-c*-1,s+1)):(s=0);return!s?10:10+*k;}
    Pieter Droogendijk, Jul 14, 2003
    #3
  4. Emmanuel Delahaye, Jul 14, 2003
    #4
  5. Alvaro Puente

    Scott Condit Guest

    Dan Pop wrote:
    > In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >
    >
    >>In 'comp.lang.c', "Alvaro Puente" <>
    >>wrote:
    >>
    >>
    >>>Do any of you know if wildcards are accepted when calling rename()
    >>>function?

    >>
    >>No, wildcards are a system feature.

    >
    >
    > What part of the description of rename() rules out the possibility of
    > wildcard support?

    The part that refers to "...the file whose name is..." can be taken to
    expressly rule out any wildcards which match more than one file ;)

    >>Try system().

    > What part of the description of system() guarantees wildcard support?

    It doesn't, but the manner in which the command processor, if any,
    executes a string passed to it is to be documented. Hence, I imagine,
    the exhortation to "try system()".

    S
    Scott Condit, Jul 14, 2003
    #5
  6. Dan Pop <> scribbled the following:
    > In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >>In 'comp.lang.c', "Alvaro Puente" <>
    >>wrote:
    >>> Do any of you know if wildcards are accepted when calling rename()
    >>> function?

    >>
    >>No, wildcards are a system feature.


    > What part of the description of rename() rules out the possibility of
    > wildcard support?


    >>Try system().


    > What part of the description of system() guarantees wildcard support?


    I tried to promise not to get into this argument, but I have to make
    this point.
    Let's ignore Dan's two arguments above as arguments by themselves, and
    consider the fact that he made both of them together.
    Dan is saying that it is implementation-dependent whether rename() and
    system() support wildcards. Note how he seems to be *advocating* the use
    of wildcards in rename() because of this, and *disadvocating* the use of
    wildcards in system() because of this.
    Why? What makes one implementation-dependent behaviour better than
    another? Why couldn't it just as easily be the other way around?

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "It's time, it's time, it's time to dump the slime!"
    - Dr. Dante
    Joona I Palaste, Jul 14, 2003
    #6
  7. Alvaro Puente

    Eric Sosman Guest

    Dan Pop wrote:
    >
    > In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >
    > >In 'comp.lang.c', "Alvaro Puente" <>
    > >wrote:
    > >
    > >> Do any of you know if wildcards are accepted when calling rename()
    > >> function?

    > >
    > >No, wildcards are a system feature.

    >
    > What part of the description of rename() rules out the possibility of
    > wildcard support?
    >
    > >Try system().

    >
    > What part of the description of system() guarantees wildcard support?


    What part of "try" says "guarantee?"

    > What happens if more than one file matches the wildcards?


    Whatever the implementation says should happen.

    system ("rename *.new *.old");

    .... has/had perfectly well-defined behavior on (Open)VMS,
    for example.

    --
    Eric Sosman, Jul 14, 2003
    #7
  8. On 14 Jul 2003 16:08:12 GMT, in comp.lang.c , Joona I Palaste
    <> wrote:

    >Dan Pop <> scribbled the following:
    >> In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >>>In 'comp.lang.c', "Alvaro Puente" <>
    >>>wrote:
    >>>> Do any of you know if wildcards are accepted when calling rename()
    >>>> function?
    >>>
    >>>No, wildcards are a system feature.

    >
    >> What part of the description of rename() rules out the possibility of
    >> wildcard support?


    No part, and thats not precisely what Joona said. What _is_ your
    problem? Why not simply augment Joona's response helpfully?

    >I'm not getting into this kind of argument again... =)



    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
    Mark McIntyre, Jul 14, 2003
    #8
  9. Mark McIntyre <> scribbled the following:
    > On 14 Jul 2003 16:08:12 GMT, in comp.lang.c , Joona I Palaste
    > <> wrote:
    >>Dan Pop <> scribbled the following:
    >>> In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >>>>In 'comp.lang.c', "Alvaro Puente" <>
    >>>>wrote:
    >>>>> Do any of you know if wildcards are accepted when calling rename()
    >>>>> function?
    >>>>
    >>>>No, wildcards are a system feature.

    >>
    >>> What part of the description of rename() rules out the possibility of
    >>> wildcard support?


    > No part, and thats not precisely what Joona said. What _is_ your
    > problem? Why not simply augment Joona's response helpfully?


    >>I'm not getting into this kind of argument again... =)


    Um, Mark, Dan's arguing with Emmanuel Delahaye here, not with me.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "Nothing lasts forever - so why not destroy it now?"
    - Quake
    Joona I Palaste, Jul 15, 2003
    #9
  10. Alvaro Puente

    Dan Pop Guest

    In <beumpn$15l$> Joona I Palaste <> writes:

    >Dan Pop <> scribbled the following:
    >> In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >>>In 'comp.lang.c', "Alvaro Puente" <>
    >>>wrote:
    >>>> Do any of you know if wildcards are accepted when calling rename()
    >>>> function?
    >>>
    >>>No, wildcards are a system feature.

    >
    >> What part of the description of rename() rules out the possibility of
    >> wildcard support?

    >
    >>>Try system().

    >
    >> What part of the description of system() guarantees wildcard support?

    >
    >I tried to promise not to get into this argument, but I have to make
    >this point.
    >Let's ignore Dan's two arguments above as arguments by themselves, and
    >consider the fact that he made both of them together.
    >Dan is saying that it is implementation-dependent whether rename() and
    >system() support wildcards. Note how he seems to be *advocating* the use
    >of wildcards in rename() because of this, and *disadvocating* the use of
    >wildcards in system() because of this.


    Don't be idiot! I wasn't advocating anything at all! Merely pointing
    out that this is entirely an implementation-specific issue, therefore
    Emmanuel's advice was bogus (in the context of this newsgroup).

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
    Dan Pop, Jul 15, 2003
    #10
  11. On 15 Jul 2003 04:38:54 GMT, in comp.lang.c , Joona I Palaste
    <> wrote:

    >Mark McIntyre <> scribbled the following:
    >> On 14 Jul 2003 16:08:12 GMT, in comp.lang.c , Joona I Palaste
    >> <> wrote:
    >>>Dan Pop <> scribbled the following:
    >>>> In <Xns93B87BADC9016hsnoservernet@130.133.1.4> Emmanuel Delahaye <> writes:
    >>>>>In 'comp.lang.c', "Alvaro Puente" <>
    >>>>>wrote:
    >>>>>> Do any of you know if wildcards are accepted when calling rename()
    >>>>>> function?
    >>>>>
    >>>>>No, wildcards are a system feature.
    >>>
    >>>> What part of the description of rename() rules out the possibility of
    >>>> wildcard support?

    >
    >> No part, and thats not precisely what Joona said. What _is_ your
    >> problem? Why not simply augment Joona's response helpfully?

    >
    >>>I'm not getting into this kind of argument again... =)

    >
    >Um, Mark, Dan's arguing with Emmanuel Delahaye here, not with me.


    So he is, quite right. No argument about that.
    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
    Mark McIntyre, Jul 15, 2003
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas F. O'Connell

    Negative Lookbehind and Wildcards

    Thomas F. O'Connell, Feb 27, 2004, in forum: Perl
    Replies:
    1
    Views:
    722
    Gunnar Hjalmarsson
    Feb 28, 2004
  2. DotNetJunkies User

    DataView filters with wildcards

    DotNetJunkies User, May 24, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    549
    DotNetJunkies User
    May 24, 2004
  3. msnews.microsoft.com
    Replies:
    0
    Views:
    1,152
    msnews.microsoft.com
    Jul 18, 2004
  4. Josh Martin
    Replies:
    6
    Views:
    1,859
    Josh Martin
    Nov 23, 2003
  5. Bill H

    Rename with wildcards?

    Bill H, Feb 3, 2006, in forum: Perl Misc
    Replies:
    6
    Views:
    315
    Aaron Baugher
    Feb 3, 2006
Loading...

Share This Page