Forum Discussion

skodali's avatar
skodali
New Contributor III
8 years ago

File Operations

I’m trying to copy files from one folder to another folder in a SFTP server. I have tried using File Operation. But I’m not able to copy all the files present in the folder. Can anyone suggest how should I approach to copy those files.

8 Replies

  • tstack's avatar
    tstack
    Former Employee

    You will probably want to use a DirectoryBrowser to get the list of files in the directory and then feed that into the FileOperation snap, like so:

    The FileOperation snap can then be configured to get the Source from the incoming document (probably $Path in this case).

  • skodali's avatar
    skodali
    New Contributor III

    @tstack I have tried by feeding the files from directory browser to the file operation but its throwing an error “Target already exists”. There are no files in the PurchaseOrders folder.

    • aleung's avatar
      aleung
      Contributor III

      Try adding a slash “/” at the end of your Target path.

    • krupalibshah's avatar
      krupalibshah
      Contributor

      you can also use file poller to poll for a files with specific pattern or use * to browse all files. You may want to also check what is the variable $path is containing so as to verify it does not have same values as that of the target path.

    • nihil_limbadiya's avatar
      nihil_limbadiya
      New Contributor II

      Hi any updates on fhis ? as i am having same issue.

      Thanks

      • Damone's avatar
        Damone
        New Contributor

        I’m having the same problem. Can someone please post how this is done? I’m getting an IOException error.