SFTP file transfer format

sftp:put service while writing the file to the directory will it write with actual filename specified in remotefile input (eg: test.xml) or the file be written with a temporary extension (like when we download in chrome)?
We have a file polling process which is monitoring this directory for any xml file and I don’t want the process to pick up an incomplete file.

Hi,

can you describe your requirement a bit more in detail please?

Where is running the IS, where is the SFTP-Server resp. the directory for the file polling hosted?

Are you running a “FilePolling”-Port in your IS?

How is your file polling configured?

Which version of wM are you using?

This will help us to provide some hints more easier.

Regards,
Holger

One easy pattern to prevent a transferred file to be picked up to early is to write it with a different name first (make sure this is not recognized by he poller) and then do a rename after the transfer. Rename and move commands are usually atomicall commands on a filesystem, so the file will be seen only after it is complete.

We are using sftp:put webMethods service to write the file into a directory (NAS mount) hosted on the same server as where the IS is installed. Can wM sftp:put service write the file with a different extension and rename it to actual file type once it completes writing data into file?

To achieve that, you need to call put with the temp filename first, then call: pub.client.ftp:rename to rename it.