Closed (fixed)
Project:
Drupal core
Version:
6.0
Component:
file system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2004 at 04:14 UTC
Updated:
14 Jul 2012 at 23:29 UTC
I've been staring at file.inc all day, and I can see no way to change a file name using this API.
Comments
Comment #1
eap1935 commentedChanged version to cvs - oops.
Comment #2
ax commentedfile_move(&$source, $dest = 0, $replace = 0)?! reopen if this doesn't do what you want.
Comment #3
(not verified) commentedComment #4
jc.vdb commentedI don't understand how to rename a file.
The problem in the file_move() funciton is that the $dest parameter must be a folder.
Is there a way to copy a file like the copy function in php?
Here's an example of what i would like to do:
Comment #5
drewish commentedi think if you specify a full path to file_move it'll honor that... did you actually try it?
Comment #6
drewish commentedComment #8
oligoelemento commentedSolution: change global $_FILES 'name' parameter