Forum Discussion

sg_sripathi's avatar
sg_sripathi
New Contributor III
8 years ago

Remote file renaming/moving

Hi,

I have a requirement to push a file to SFTP server. But since the file is quite large and to avoid race condition (we writing and remote function reading at the same time) we like to write the file with different extension or to a temp folder in remote server and them rename or move the file at the server.

None for the File snaps support these feature. Could you please help me identify a way around to address above problem.

13 Replies

  • We requested for File move snap with snaplogic.

  • aleung's avatar
    aleung
    Contributor III

    This would be a great enhancement request. Move function for all Files related snap (e.g. File and Box snaps)

    • sg_sripathi's avatar
      sg_sripathi
      New Contributor III

      I agree. Box has move function available through “Box File Operation” snap. But for SFTP, S3 and others we do not have dedicated snap which makes it difficult. One option as I mentioned below is to provide a check box for File Writer snap to write .temp file while uploading and rename to original filename once uploaded.

      • aleung's avatar
        aleung
        Contributor III

        yes and no. Couldn’t it perform rename if the account is SFTP and mv (for move) if account is S3?

    • Surendar's avatar
      Surendar
      Contributor

      Yes I too facing the same. It will be great if we have separate snap for (SFTP/FTP/File writer) or any options for file copy/move operation like “Box File Operations”.

      Looking the same and waiting for enhancements.

  • Why can’t you write with a .temp extension and use a python script to rename/move to the desired location?

    • sg_sripathi's avatar
      sg_sripathi
      New Contributor III

      Hi,

      One of your colleague directed me in this way, technically it does work. But it isn’t straight forward for “Citizen Integrator”. If the file writer Snap can have a check box “Use .temp while uploading” would be more simple solution.

      Regards,
      Sripathi

    • Surendar's avatar
      Surendar
      Contributor

      Using “File Operation” snap you can able to copy/move files in FTP, S3 etc

  • ash42's avatar
    ash42
    New Contributor III

    I want to move a file written in snaplogc project space to a ftp loaction using script.File writer is misbehaving as its taking too long to write ,as well as it is writing incomplete data