12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

InstructionRenameFileFile and Serial Channel HandlingRenameFile - Rename a fileRenameFile is used to give a new name to an existing file. It can also be used to movea file from one place to another in the directory structure.ExamplesRenameFile “HOME:/myfile”, “HOME:/yourfile;The file myfile is given the name yourfile.RenameFile “HOME:/myfile”, “HOME:/mydir/yourfile”;The file myfile is given the name yourfile and is moved to the directory mydir.ArgumentsRenameFileOldPath NewPathOldPathData type: stringThe complete path of the file to be renamed.NewPathData type: stringThe complete path of the renamed file.Program executionThe file specified in OldPath will be given the name specified in NewPath. If the pathin NewPath is different from the path in OldPath, the file will also be moved to the newlocation.Error HandlingIf the file specified in NewPath already exists, the system variable ERRNO is set toERR_FILEEXIST. This error can then be handled in the error handler.SyntaxRenameFile [ OldPath ’:=’ ] < expression (IN) of string > ’,’[ NewPath ’:=’ ] < expression (IN) of string >’;’<strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R 395

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!