How to Delete a File from the O/S from oracle developer Forms ?
---------------------------------------------------------------
1)
The first way to delete a file on the O/S is to use the HOST command. The HOST
built-in allows to execute an indicated operating system command.
Syntax (see forms on-line help)
PROCEDURE HOST(system_command_string VARCHAR2);
PROCEDURE HOST(system_command_string VARCHAR2,screen_action NUMBER);
On a Windows platform your code would look like :
HOST ( 'del C:\temp\temp1.lis', NO_SCREEN );
On a Unix platform you code would look like :
HOST ( 'rm /tmp/temp1.lis', NO_SCREEN );
As this solution is based on the HOST command it applies to all platforms.
2).
Another way to delete a file form the O/S is to use for Client/Server
D2kWutil: WIN_API_UTILITY.DELETE_FILE
or for Webforms
webUtil: webutil_file.delete_file.
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Monday, May 16, 2011
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
1 comment:
HOST('cmd /c del D:\Slips\\*.pdf',NO_SCREEN);
Post a Comment