Re: Deleting a file with a trigger?

From: Sreedhar V. Lokam <sreedhar_at_ix.netcom.com>
Date: 1995/09/16
Message-ID: <43eugs$nch_at_ixnews3.ix.netcom.com>#1/1


dstrait_at_omni.voicenet.com ("Darin Strait") wrote:

>Is there anyway that I can delete a file from within a database trigger?
 

>Here is the situation:
 

>One of the columns ("filename") in my table contains data of the format:
>"c:\wavefiles\foo.wav"
 

>I want to ensure that when the row gets deleted, the corresponding disk
>file gets deleted too.
 

>Am I barking up a blind alley or can this actually be done? I'm running on
>Windows NT, using Oracle 7.1.
 

>TIA,
>-darin!

Hi darin :

I have not done this particular thing any time, but I know how to do it. Giive this a try. You can write a script file and can run that script file from with in the PL/SQL code ie. ur database trigger. Since you can get the name of the file to be deleted as it a field in the table you can pass this as an argument to the script file. eg: you can pass it as a $1 argument to the script file if it is a Unix script file. You can do the same in DOS also. run a batch file. That is it.

Sreedhar Lokam

e-mail : sreedhar_at_ix.netcom.com Received on Sat Sep 16 1995 - 00:00:00 CEST

Original text of this message