Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is cffile action="rename" === fileMove in CFScript?

Does fileMove() do exactly the same thing as <cffile action="rename">?

like image 930
Henry Avatar asked Oct 25 '25 12:10

Henry


1 Answers

No they are different. There is no CFML Script function available to do a file Rename. So, the above use case is just a trick to achieve file rename.

You have to specify the same source and destination folder but change the file name in <destination>.

filemove("c:\userdata\files\myFile.docx", "c:\userdata\files\yourFile.docx");
like image 79
Sanjeev Avatar answered Oct 28 '25 04:10

Sanjeev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!