12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Descriptions of the Library Routines 2oldname(Input) Character*(*). Current name of the file to be renamed.newname(Input) Character*(*). New name of the file to be renamed.Results:The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE..You can use RENAMEFILEQQ to move a file from one directory to another on the same drive bygiving a different path in the newname parameter.If the function fails, call GETLASTERRORQQ to determine the reason. One of the followingerrors can be returned:• ERR$ACCES – Permission denied. The file’s permission setting does not allow the specifiedaccess.• ERR$EXIST – The file already exists.• ERR$NOENT – File or path specified by oldname not found.• ERR$XDEV – Attempt to move a file to a different device.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “FINDFILEQQ”, “RENAME”, “GETLASTERRORQQ”ExampleUSE IFPORTUSE IFCOREINTEGER(4) lenCHARACTER(80) oldname, newnameLOGICAL(4) resultWRITE(*,'(A, \)') ' Enter old name: 'len = GETSTRQQ(oldname)WRITE(*,'(A, \)') ' Enter new name: 'len = GETSTRQQ(newname)result = RENAMEFILEQQ(oldname, newname)END2-377

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

Saved successfully!

Ooh no, something went wrong!