18.4.0 released Sep 25, 2023
Rename file

Purpose: Renames a file.

rename-file <from file> to <to file> [ status [ define ] <status> ]

rename-file will rename <from file> to <to file>. Optional <status> variable is VV_OKAY on success and VV_ERR_RENAME on failure, and can be created with optional "define".

<from file> and <to file> must be specified with full paths unless they are in the current working directory (see vv), in which case a name alone will suffice, and can be in different directories.
Examples
Rename files:
rename-file "/home/u1/d1/f1" to "/home/u1/d2/f2" status define st
if (st == VV_OKAY)  {
    @Rename successful. <br/>
}

Rename files in the current working directory:
rename-file "f1" to "f2" status define st
if (st == VV_OKAY)  {
    @Rename successful. <br/>
}

See also
Files
close-file  
copy-file  
delete-file  
file-position  
file-storage  
file-uploading  
lock-file  
open-file  
read-file  
read-line  
rename-file  
stat-file  
temporary-file  
uniq-file  
unlock-file  
write-file    
See all
documentation


You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a link back to this page (dofollow) - see full license at CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind.