cancel
Showing results for 
Search instead for 
Did you mean: 

Service for delete local files in Business Connector

Former Member
0 Kudos

I have used the "get" service for copy the files in the Business connector, does anybody know if there is any service for delete local files, i have seen the service for delete remote files with ftp, but i don´t know how to delete the copied files in my server.

Thanks in advance

regards

Accepted Solutions (1)

Accepted Solutions (1)

iprieto
Contributor
0 Kudos

Hi Carlos,

For this issue the best choice is create your own Java Service. I attach you the Java code:

Put this code in a new Java Service

boolean success = (new File("filename")).delete();

if (!success) {

// Deletion failed

}

Before, you must to create an input parameter in the new service where you must to save the file path. Change Filename with the input parameter variable.

It's not difficult.

Best Regards

Ivá

Former Member
0 Kudos

It seems a very good idea that can resolve all of my problems, but when i create the new java service and i try to execute it, it gives me an error about "my service is not operational". Does anybody knows what can be the problem?.

Thnaks in advance

Regards

Former Member
0 Kudos

Hello Ivan:

Your idea is really very good, but after some verifications i have seen that i haven´t java compiler in this server and system department is not going to install on it. Do you think another solution?.

I wiil give you points anyway, it was a very good solution.

Thanks in advance

regards

iprieto
Contributor
0 Kudos

Carlos, I don't know other solution for this issue.

Maybe you can schedule a system operative job that delete those files.

Sorry and Best regards

Iván

PD: Check if you can see the package WmSamples/sample/IO/utils . There is a service named deleteFile, maybe you can use this service.

Answers (0)