Professional Web Applications Themes

How Can I rename File using Perl?.. - PERL Beginners

How can i rename any file using PERL?...Where should i start?..Where i can find any tutorial? This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal....

  1. #1

    Default How Can I rename File using Perl?..

    How can i rename any file using PERL?...Where should i start?..Where i can find any tutorial?

    This e-mail and any attachments may contain confidential and
    privileged information. If you are not the intended recipient,
    please notify the sender immediately by return e-mail, delete this
    e-mail and destroy any copies. Any dissemination or use of this
    information by a person other than the intended recipient is
    unauthorized and may be illegal.
    Roime Guest

  2. #2

    Default RE: How Can I rename File using Perl?..


     

    C:\>perldoc -f rename
    rename OLDNAME,NEWNAME
    Changes the name of a file; an existing file NEWNAME will be
    clobbered. Returns true for success, false otherwise.

    Behavior of this function varies wildly depending on your system
    implementation. For example, it will usually not work across
    file system boundaries, even though the system *mv* command
    sometimes compensates for this. Other restrictions include
    whether it works on directories, open files, or pre-existing
    files. Check perlport and either the rename(2) manpage or
    equivalent system doentation for details.


    C:\>

    C:\>perldoc perldoc

    to learn how to use perldoc

    HTH,

    Josť.


    **** DISCLAIMER ****

    "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above.
    Any use of the information contained herein (including, but not limited to,total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited.
    If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer".

    Thank you for your cooperation.

    For further information about Proximus mobile phone services please see ourwebsite at http://www.proximus.be or refer to any Proximus agent.

    NYIMI Guest

  3. #3

    Default Re: How Can I rename File using Perl?..

    Roime bin Puniran said: 
    can find any tutorial?

    using linux:

    man mv

    you can use a system() call or backticks ``
     
    e-mail and destroy any copies. Any dissemination or use of this 




    --
    Just getting into the best language ever...
    Fancy a me.uk? Just ask!!!
    Gavin Guest

  4. #4

    Default Re: How Can I rename File using Perl?..

    On Thu, 30 Sep 2004 11:18:08 +0100, Gavin Henry wrote:
     
    > can find any tutorial?
    >
    > using linux:
    >
    > man mv
    >
    > you can use a system() call or backticks ``
    >[/ref]

    Why would you want to do that when you've got a specific perl command?
    Chris Guest

  5. #5

    Default Re: How Can I rename File using Perl?..

    On Thu, 30 Sep 2004, Gavin Henry wrote:
     
    >
    > using linux:
    >
    > man mv
    >
    > you can use a system() call or backticks ``[/ref]

    The question wasn't how to do this with Linux though, it was about how
    to use Perl.

    The message headers suggest that Roime is using Windows --

    Content-Type: text/plain;
    cht="Windows-1252"

    -- so the other response about the rename command was appropriate.

    Moreover, rename() is a basic part of Perl, so even on Linux there is no
    need to do this with a system call to the `mv` command.



    --
    Chris Devers
    Chris Guest

  6. #6

    Default Re: How Can I rename File using Perl?..

    > Moreover, rename() is a basic part of Perl, so even on Linux there is no 

    Of course, doh.

    --
    Just getting into the best language ever...
    Fancy a me.uk? Just ask!!!
    Gavin Guest

Similar Threads

  1. rename all file extensions
    By tony in forum Linux / Unix Administration
    Replies: 11
    Last Post: February 2nd, 05:11 PM
  2. rename file and/or folder
    By kecsun in forum Macromedia Contribute General Discussion
    Replies: 0
    Last Post: November 13th, 08:46 PM
  3. Why can't I rename this file?
    By Dan in forum Linux / Unix Administration
    Replies: 2
    Last Post: May 13th, 05:31 PM
  4. Rename a file
    By Chinku Simon in forum PERL Beginners
    Replies: 2
    Last Post: October 24th, 05:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139