Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: rename files

by srdst13 (Pilgrim)
on Aug 08, 2005 at 13:34 UTC ( #481872=note: print w/ replies, xml ) Need Help??


in reply to rename files

Try:

rename("$number.gif","$numbers_replace.GIF")

Note the quotes. Does that do it?

Sean


Comment on Re: rename files
Download Code
Replies are listed 'Best First'.
Re^2: rename files
by Fletch (Chancellor) on Aug 08, 2005 at 13:48 UTC

    Probably not since, aside from not checking the return status from rename, the pathnames still aren't being adjusted relative to the base directory they passed opendir.

    --
    We're looking for people in ATL

      The proof of this (probably accurate) issue could also be being hidden if '/temp_gif' is not a valid mountpoint -- it seems rather plausible, though not yet proven, that './temp_gif' is what was wanted.

      One world, one people

        Erm, since they actually did remember to put error checking on the opendir call that would catch that case.

        --
        We're looking for people in ATL

Re^2: rename files
by Anonymous Monk on Aug 08, 2005 at 13:40 UTC
    i also tried that with no success

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://481872]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-31 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls