Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question DELETE FILE BY THE SFTP

More
30 Jan 2018 15:19 #1 by asma
DELETE FILE BY THE SFTP was created by asma
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
Replied by Thomas BLETON on 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
Replied by IMANE on 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
Replied by Thomas BLETON on 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
Replied by Seby on 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
Replied by Thomas BLETON on 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
Replied by Seby on 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
Replied by Thomas BLETON on 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
Replied by Seby on topic DELETE FILE BY THE SFTP
ok
Thanks for your help !
More
08 Oct 2019 11:25 #10 by NORAUTO_LESQUIN
Replied by NORAUTO_LESQUIN on 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