Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question DELETE FILE BY THE SFTP

More
30 Jan 2018 15:19 #1 by asma
asma created the topic: DELETE FILE BY THE SFTP
HELLO,

I use the component Get files with SCP to get the file but i have to delete after that.
How can we delete a file in a sftp server?

Thanks a lot
Asma
More
05 Feb 2018 11:21 #2 by Thomas BLETON
Thomas BLETON replied the topic: DELETE FILE BY THE SFTP
Deleting a remote file cannot be done with SCP.
Maybe you can use the SSH action?
More
16 Nov 2018 10:37 - 16 Nov 2018 10:38 #3 by IMANE
IMANE replied the topic: DELETE FILE BY THE SFTP
Hello Thomas,

We have been facing the same problem for many weeks now,
We do exchange many files with our external partners.
And for some of them we don't have full access to SSH, for security reasons

Is there any component other than SCP and FTP are you planing to develop one for sFTP?

Thank you
Imane
Last Edit: 16 Nov 2018 10:38 by IMANE.
More
21 Nov 2018 09:31 #4 by Thomas BLETON
Thomas BLETON replied the topic: DELETE FILE BY THE SFTP
Hi,
Yes we are planning to add an sftp action, where you can "script" your sftp session with standard sftp commands.
It is not ready for release yet, so for now I would recommend using a scripting action.
Here is a sample process which does sftp transfer + delete. Feel free to adapt it to your needs.

This message has an attachment file.
Please log in or register to see it.

More
25 Jan 2019 13:58 #5 by Seby
Seby replied the topic: DELETE FILE BY THE SFTP
Hello Thomas,

I use your script to delete a file after transfert it with the "Get files with SCP".
It work's fine with my local runtime but not on the server runtime...

I've got this error :

Bean Scripting
org.apache.bsf.BSFException: unable to load language: beanshell
at org.apache.bsf.BSFManager.loadScriptingEngine(BSFManager.java:718)
at org.apache.bsf.BSFManager.exec(BSFManager.java:485)
at com.indy.engine.actionCodes.BeanScriptingActionCodeI.executeCodewithRSet(SourceFile:125)
at com.indy.engine.actionCodes.BeanScriptingActionCodeI.executeSimpleCode(SourceFile:172)
at com.indy.engine.action.common.ActionCodeTypeI.executeCode(SourceFile:1595)
at com.indy.engine.action.common.ActionCodeTypeI.run(SourceFile:1754)
at java.lang.Thread.run(Thread.java:744)

Do you have an idea ?

Thank you
More
25 Jan 2019 15:06 #6 by Thomas BLETON
Thomas BLETON replied the topic: DELETE FILE BY THE SFTP
Hi Seby, what is the version of the Runtime which produces this error?
More
25 Jan 2019 16:06 #7 by Seby
Seby replied the topic: DELETE FILE BY THE SFTP
The version seems to be 17.2.1.
The script work on an other server, with a 17.4.1 version.
More
25 Jan 2019 16:58 #8 by Thomas BLETON
Thomas BLETON replied the topic: DELETE FILE BY THE SFTP
Thanks.
These versions are getting old, particularly 17.2.1 ;-)

Beanshell support was added in version 17.2.2 ("Enhancement 509" in the changelog).
More
25 Jan 2019 17:44 #9 by Seby
Seby replied the topic: DELETE FILE BY THE SFTP
ok
Thanks for your help !
More
08 Oct 2019 11:25 #10 by NORAUTO_LESQUIN
NORAUTO_LESQUIN replied the topic: DELETE FILE BY THE SFTP
Hi Thomas,

This is a feature that would really help us !
Do you have an idea of the release date ?

For now we scripted the delete action but we hope to make a full-stambia transfer file box ...

Thanks

Best regards
Cédric