Usually we get requirements to move files from one location to another. The most easy option we think of for this purpose is through shell script, but there is a simple pl/sql api which can do this job easily for us.
You must have heard about UTL_FILE utility provided by oracle. We can use this utility for moving our files from one locatio to another. It has some limitations as well, such as the directory structure used by it should be in the UTL_FILE_PATH in init.ora or Directory object should exist for that path
The following code/Script can be used for Copying the file:
Utl_File.Fcopy ( src_location => p_file_location
,src_filename => p_file_name
, dest_location => p_arch_location,
dest_filename => p_arch_file );
The following code/Script can be used for removing the file:
UTL_FILE.Fremove(p_file_location,lc_datafile_name);
Most Frequently Used PLSQL Scripts In Oracle Apps:
- How To Add Any Responsibility To A User From Back End
- How To Call A Standard Interface Program From Sql or pl/sql Code
- How To Copy Files Using a PL/SQL Script
- How To Delete A Concurrent Program And Executable From Back End In Oracle Apps
- How To Dump Data From Pl/SQL Block To Flat Files
- How To Get All The View That Are Referring To A Particular Table
- How To Get RESPONSIBILITY_ID, APPLICATION_ID & USER_ID
- How To Send An SMS Using PL/SQL Code/Script
- PL/SQL Script To Change/Reset The Oracle Applications Password From Back End
- PL/SQL Script To Create A User In Oracle Applications
- PL/SQL Script To Remove End Date From Responsibilities Assigned To A User
COMMENTS