EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP On After Transfer command

Posted: 02/01/2012 10:40:21
by Pdaalmeyer  (Basic support level)
Joined: 01/24/2012
Posts: 8

Hi Innokentiy,

I have just tested the 9.1.214 version and the touch command is working just like you describe above with the command script :-) I couldn't get it to work by just enetring a command like this:

touch myTest.RDY

but that is no problem as the command script works.

I tested with the %MessageID% macro and that also worked. I was wondering if there is also a macro for a filename that is set dynamically using the BizCrypto.BizTalk.Adapters.SFTP.RemoteFileName property?

Thanks again for all your help/support,


Posted: 02/03/2012 05:22:35
by Ken Ivanov (Team)

Great, we are glad that it works for you.

In fact, the main reason for introducing command scripts was to provide the maximal flexibility for the client. Some particular commands just cannot be "described" in a Unix-like way (though "touch" is not the case); besides, command scripts make it easy to describe complex, multi-entry commands. So, although they might appear of a little inconvenience when issuing simple commands, command scripts are actually a powerful instrument when it comes to bigger and more sophisticated ones.

I was wondering if there is also a macro for a filename that is set dynamically using the BizCrypto.BizTalk.Adapters.SFTP.RemoteFileName property?

Please use the %SourceFileName% macro as a placeholder for BizCrypto.BizTalk.Adapters.SFTP.RemoteFileName context property.
Posted: 01/21/2014 10:32:43
by Vincent Giroux (Basic support level)
Joined: 12/16/2013
Posts: 3


we have to implement a similar requirement as the original poster which is to create an empty file on the server in the same directory as the main output file after it has been transferred. The main difference is that we must use the FTPS protocol rather than SFTP.

We were initially thinking of using the On After Send property along with a command script to achieve this requirement, but since the FTPS adapter only seem to support FTP (RFC 959) control channel commands, I don't think there is a way to create an empty file (or even copy a local or remote empty file) in a command script.

The alternative solution would require us to develop an orchestration (which ideally we would prefer not to).

Do you see any other alternate solutions we might have missed which would not involve using an orchestration? Also, do you have any plans to support additional command script commands (e.g. touch) in the FTPS adapter in the near future ?

Posted: 01/21/2014 12:26:47
by Ken Ivanov (Team)

Hello Vincent,

I am afraid there's no way to 'touch' a file with current version of BizCrypto, as FTP does not expose a corresponding command - the only way to create an empty file on a RFC959-compliant FTP server is to actually upload it.

We are currently finalizing the works on the next major product version, BizCrypto 11, first beta of which will be released within a week (fingers crossed ;)). I will check if we can add support for the 'touch' command in the near future painlessly enough and get back to you shortly.

Posted: 01/21/2014 14:52:15
by Ken Ivanov (Team)


We'll add support for the 'touch' command in version 11. The command will be usable in the upcoming beta. Use the below syntax to invoke it:

<command type="aux" value="touch" filename="%MessageID%.lck" />

Note that the command is of the 'aux' type, to distinguish it from built-in FTP commands that are transparently routed to the server.

Posted: 01/21/2014 16:14:33
by Vincent Giroux (Basic support level)
Joined: 12/16/2013
Posts: 3

Thanks Ken.

Do you have a rough estimate as far as when we can expect the beta and release versions of BizCrypto 11 to be available ?
Posted: 01/21/2014 16:57:19
by Ken Ivanov (Team)

We are working on version 11 beta at the moment and plan to release it within a week, provided that nothing really unpredictable happens. I believe that early Spring is a realistic estimate for the public release.
Posted: 02/04/2014 05:07:09
by Ken Ivanov (Team)

Hello Vincent,

BizCrypto 11 beta is available for download here. The beta includes support for the 'touch' command you requested. Use the following syntax to issue the command in one of the On* command handlers:

<commands><command type="aux" value="touch" filename="myfile.ext" /></commands>

You are welcome to upgrade your current BizCrypto installation to version 11 and give the command a try.

Posted: 02/05/2015 05:33:11
by Bhaswar Dutta (Standard support level)
Joined: 02/05/2015
Posts: 1

I need to know the following for specific requirement that I am working on

1. How do you provide the command script to the BizCrypto SFTP adapter?

2. Is the CHMOD command supported in the command script?

The requirement is that while a file is being written to by the SFTP adapter no other system polling for that file should pick it up ,hence we need the SFTP adpater to be able to control the permission on the file.If we could use the CHMOD command it then will be possible to have a lock on the file while it is being written to .

Let me know if that is feasible idea?
Posted: 02/05/2015 07:07:29
by Ken Ivanov (Team)

Hi Bhaswar,

Thank you for contacting us.

1. The script should be assigned to so-called 'milestone' or 'event' properties of the adapter (such as On Before Transfer, On After Transfer and others), depending on the business logic that you want to achieve.

2. The CHMOD command is not supported due to limitations of the SFTP protocol. However, you goal can be achieved in a different way, by using 'safe upload'. The idea is basically that the file is uploaded under a different name or to a different directory, and renaming it to a proper name once the upload is finished. You can read more about using safe uploads here.




Topic viewed 29009 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!