Reference/Rename: Difference between revisions
(Created page with "=Rename= [/REBOOTOK] source_file dest_file Rename source_file to dest_file. You can use it to move a file from anywhere on the system to anywhere else and you can move a direc...") |
mNo edit summary |
||
Line 8: | Line 8: | ||
<highlight-nsis>Rename $INSTDIR\file.ext $INSTDIR\file.dat</highlight-nsis> | <highlight-nsis>Rename $INSTDIR\file.ext $INSTDIR\file.dat</highlight-nsis> | ||
''Command introduced with NSIS v1.2'' |
Latest revision as of 20:18, 4 June 2013
Rename
[/REBOOTOK] source_file dest_file
Rename source_file to dest_file. You can use it to move a file from anywhere on the system to anywhere else and you can move a directory to somewhere else on the same drive. The destination file must not exist or the move will fail (unless you are using /REBOOTOK). If /REBOOTOK is specified, and the file cannot be moved (if, for example, the destination exists), then the file is moved when the system reboots. If the file will be moved on a reboot, the reboot flag will be set. The error flag is set if the file cannot be renamed (and /REBOOTOK is not used) or if the source file does not exist.
If no absolute path is specified the current folder will be used. The current folder is the folder set using the last SetOutPath instruction. If you have not used SetOutPath the current folder is $EXEDIR.
Rename $INSTDIR\file.ext $INSTDIR\file.dat
Command introduced with NSIS v1.2