Re: Renaming Files
| From: | David Robley | Date: | Mon, 04 Sep 2000 02:46:57 +0000 |
| Subject: | Re: Renaming Files | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15038@lists.php.net to get a copy of this message | ||
On 3 Sep, Andrew V. Romero wrote:
> I have been teaching myself php lately, but I can't figure out how to
> rename files.
> I created a php file that has a line in it:
> rename("test.txt","testing.txt");
> but when I run this script, it gives me an error
> "Warning: Rename failed (No such file or directory) in c:\program
> files\apache group\apache\htdocs\forms\access.php3 on line 37" .
> My script, the html file that gives data to the script, and the test.txt
> file are all in the same directory so I don't see why it is saying it
> can't find file. Does anyone know what I am doing wrong?
> Thanks,
> If you want to reply personally, remove all numbers from my address.
> --
> Andrew V. Romero
> Romer1999o@pharmacy.arizona.edu
> Remove the #'s from my address to reply.
> http://www.u.arizona.edu/~avr/
> ICQ #54080914
Have a look at the notes on the rename command at www.php.net. It seems
that Windows may want a full path name to the files.
It might be interesting to put something in your script to tell you what
the current working directory is.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA