Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
it seems at the moment its not possible to remove a folder via tSCPDelete:
rm: cannot remove '/volume1/Profile/axel.kr.V2': Is a directory Exception in component tSCPDelete_1 (test_activedirectory_delete) java.lang.RuntimeException: File(s) deleting failed.Exit code: 1 at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tIterateToFlow_1_AIProcess(test_activedirectory_delete.java:7432) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tSCPFileList_1Process(test_activedirectory_delete.java:4566) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tSCPConnection_1Process(test_activedirectory_delete.java:4065) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tMysqlInput_1Process(test_activedirectory_delete.java:3867) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tMysqlConnection_1Process(test_activedirectory_delete.java:1442) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.tLDAPConnection_2Process(test_activedirectory_delete.java:1269) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.runJobInTOS(test_activedirectory_delete.java:7950) at t4y.test_activedirectory_delete_0_1.test_activedirectory_delete.main(test_activedirectory_delete.java:7793)
i want to delete automaticly about 1500 folders
Thx!
Erik
Hello ,
try below line in tJava instead of tSCPDelete
below code worked for me :
ch.ethz.ssh2.Session session = ((ch.ethz.ssh2.Connection)globalMap.get("conn_tSCPConnection_1")).openSession();
session.execCommand("rm -r /home/xxxxxx/abc");
int returnCondition = session.waitForCondition(ch.ethz.ssh2.ChannelCondition.EXIT_STATUS,300L);
Let me know if works.
of course user has rights... problem is that the tSCPDelete will create command like "rm /path/folder" but to delete a folder it must be "rm -r /path/folder"
Hello ,
try below line in tJava instead of tSCPDelete
below code worked for me :
ch.ethz.ssh2.Session session = ((ch.ethz.ssh2.Connection)globalMap.get("conn_tSCPConnection_1")).openSession();
session.execCommand("rm -r /home/xxxxxx/abc");
int returnCondition = session.waitForCondition(ch.ethz.ssh2.ChannelCondition.EXIT_STATUS,300L);
Let me know if works.
awesome! thank you so much!