note 91994 added to function.rename
| From: | php-page at mailfilter dot com dot ar | Date: | Sat, 04 Jul 2009 04:06:43 +0000 |
| Subject: | note 91994 added to function.rename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157900@lists.php.net to get a copy of this message | ||
In Windows, on FAT32, rename will fail with "bad file descriptor" if the underlying short
(8.3) file name of the file to rename is the same as the new file name. For example, attempting to
rename "Oxygène.m3u" to "Oxygene.m3u" will fail if the 8.3 name of
"Oxygène.m3u" is "OXYGENE.M3U" (which is very likely), as Windows will take
both names as belonging to the same file. To solve this you must first rename the file to an
intermediate name and then rename it to the intended name. To see the short (8.3) file names in a
directory you can type DIR /X on a cmd box.
----
Server IP: 201.216.232.3
Probable Submitter: 190.49.218.176
----
Manual Page -- http://www.php.net/manual/en/function.rename.php
Edit -- https://master.php.net/note/edit/91994
Del: integrated -- https://master.php.net/note/delete/91994/integrated
Del: useless -- https://master.php.net/note/delete/91994/useless
Del: bad code -- https://master.php.net/note/delete/91994/bad+code
Del: spam -- https://master.php.net/note/delete/91994/spam
Del: non-english -- https://master.php.net/note/delete/91994/non-english
Del: in docs -- https://master.php.net/note/delete/91994/in+docs
Del: other reasons-- https://master.php.net/note/delete/91994
Reject -- https://master.php.net/note/reject/91994
Search -- https://master.php.net/manage/user-notes.php