My Oracle Support Banner

How to Copy Any File using UTL_FILE (Doc ID 956907.1)

Last updated on MARCH 03, 2024

Applies to:

PL/SQL - Version 10.1.0.2 and later
Information in this document applies to any platform.

Goal

To show you how to use the UTL_FILE package to copy any type of file:

NOTE: While UTL_FILE.FCOPY can be used to copy valid text files, it does not copy binary files or invalid text files.  An example of an invalid text file would be one that contains a character sequence that cannot be generated by the characters on your keyboard (i.e. the sequence of two CR's in a row on a Windows platform rather than CRLF, CRLF) and hence may be considered a binary file.

 

NOTE: As UTL_FILE first supported the reading and writing of binary files in 10gR1, this note can only be used with Oracle Database versions 10gR1 and later.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.