Closed Thread Icon

Preserved Topic: PHP: how to delete or rename a file? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21208" title="Pages that link to Preserved Topic: PHP: how to delete or rename a file? (Page 1 of 1)" rel="nofollow" >Preserved Topic: PHP: how to delete or rename a file? <span class="small">(Page 1 of 1)</span>\

 
GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-15-2001 14:10

well, the topic says it all. i didnt find anything in the PHP manual.

i need this, because im writing an admin-script for backing up/deleting textfiles.



bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-15-2001 14:56

ummm...


you didn't look enough

copy
unlink (delete)

The two together should allow you to rename files.
Don't know if there's a straight up rename command. however you can always use an exec command to do these easy enough on a *nix file system (it's exec("mv oldfilename newfilename"); I believe



:[ Computers let you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila. ]:

[This message has been edited by bitdamaged (edited 12-15-2001).]

[This message has been edited by bitdamaged (edited 12-15-2001).]

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 12-15-2001 15:16

cooool!

actually i only looked in the area of fopen, fgets, etc.

big thanks, bitdamaged.

edit: btw: there's rename too!
http://www.php.net/manual/en/function.rename.php





[This message has been edited by GRUMBLE (edited 12-15-2001).]

« BackwardsOnwards »

Show Forum Drop Down Menu