How to Mass rename files using PHP

Discussion in 'PHP' started by misohoni, Nov 18, 2011.

  1. #1
    I remember using PHP to add a file-extension to all files in a certain directory, but how do I use PHP to remove part of a filename for all files?

    I have files in one directory like xx.avi.flv which should be xx.flv

    Can anyone help?
     
    Solved! View solution.
    misohoni, Nov 18, 2011 IP
  2. #2
    Anveto, Nov 18, 2011 IP
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    brilliant and brilliant idea for creating content for the site!
     
    misohoni, Nov 18, 2011 IP
  4. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #4
    Actually doesn't work..I get this error:
    Parse error: syntax error, unexpected T_DNUMBER on line 3...is there something missing?
     
    misohoni, Nov 18, 2011 IP