note 91994 deleted from function.rename by cmb
| From: | cmb@php.net | Date: | Sun, 22 Dec 2019 09:10:41 +0000 |
| Subject: | note 91994 deleted from function.rename by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213599@lists.php.net to get a copy of this message | ||
Note Submitter: php-page at mailfilter dot com dot ar
----
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.