Skip to main content
Solved

Delete a file from folder

  • March 5, 2019
  • 3 replies
  • 195 views

Raj Rozendaal
Sidekick
Forum|alt.badge.img+3
I need to perform a delete action in a folder on my server, similar to what is described as the process action 'delete file'. Only for me it won't be executed in a process flow. Is it possible to use the same code (call the same procedure) which the process action 'delete file' is using or do i have to write my own call to the command shell.

Best answer by Jasper

Hi Raj,

You can indeed delete files from a stored procedure with, for example, xp_cmdshell on SQL Server. We do advise you to use a proxy account for security reasons. Also note that this will not work on Azure Databases.

We are working on a feature to be able to execute process flows from Indicium. This will be the recommended solution in the future.
This topic has been closed for replies.

3 replies

Forum|alt.badge.img+4
It depends on when you want the action to be called and where you want to call it from. The 'Delete file' process action can only be called from a process flow. It is not a procedure on the database which can be called from a trigger, for instance. However, you might be able to chain it to an 'Add row' or 'Execute task' process action to achieve a similar result. It really depends on the situation.

Raj Rozendaal
Sidekick
Forum|alt.badge.img+3
  • Author
  • Sidekick
  • March 5, 2019
The action will be executed without the use of the proces flow functionality. This leaves me one option i guess, deleting the file in a stored procedure.

And since the process action 'delete file' can't be called upon from within the procedure is have to build this myself. Can you confirm this?

Jasper
Superhero
  • Answer
  • March 6, 2019
Hi Raj,

You can indeed delete files from a stored procedure with, for example, xp_cmdshell on SQL Server. We do advise you to use a proxy account for security reasons. Also note that this will not work on Azure Databases.

We are working on a feature to be able to execute process flows from Indicium. This will be the recommended solution in the future.