fileRename() but directoryMove() Inconsitancy

Having a seniors moment, but was there ever a fileRename function?

There is a directory rename function… do we just use fileMove then fileDelete?

Chris

Lucee 6.2/7 series…

Can’t you just do the fileMove? No need for fileDelete after, right?

fileMove(expandPath("./myFile.txt"), expandPath("./myNewFileName.txt"));
4 Likes

Was double seniors moment, why would you delete after moving? #lol

I think my confusion came because we have fileMove(), but no fileRename() and we have directoryRename() but not directoryMove()??

stuff like this hurts my brain…

why can’t we just have fileMove() and directoryMove() and use them for rename ??

1 Like

in lucee you dont have to expandPath in paths btw! #woot