Menu
I am using the CozyRoc SFTP task to download various data files from an SFTP site. The process currently connects to the SFTP site, downloads the file(s) with today's date, checks to see if they have already been downloaded/processed, if not it uploads the file(s) to another SFTP site. Some files can be rather large and take 2-3 minutes before they're ready to download. I'm currently only running it once per hour and users know not to run the process that genrates the files during a 5 minute window. I need to have the task check every few minutes for new files, but only want to download the file if it isn't currently being written to.
I'm guessing the best method would be to connect to the SFTP site and get the file size, wait xx seconds and get the file size again. Not sure how to do this.
Ideally I'd like to get the remote file attributes (specifically file size) - then get them again every 10 seconds and once the size hasn't changed download the file and proceed with processing the file. Right now I'm running a loop where I download the file, get it's file size, download it again after 10 seconds, compare the file size and if it hasn't changed then proceed, otherwise do the whole process over again. This isn't too bad for small files, but I don't want to repeatedly download larger files. The thing is, I'm not sure how to just get the file size attribute from a file on an SFTP site without downloading it. In version 1.2 SR-2, you can call: ExtendedRemoteFileInfo that will return an array of fileinfo: IFileInfo (1.2 SR-2) This interface is used to retrieve extended remote file information when using Get remote files list action in the SFTP Task.
Cozyroc 1.7
Name property (string) Returns file name. Size property (long) Returns file size. ModifiedTime property (DateTime) Returns file modification time. Permissions property (int) Returns file permissions.
IsDirectory property (bool) Returns true if directory. Have a look at: and the SFTP taks )right hand side, two thirds down).
![Download Cozyroc Zip Multiple Files Download Cozyroc Zip Multiple Files](/uploads/1/2/4/2/124292425/941629380.png)
Cozyroc Install
Unzip all major formats With just a click, open all major, including, GZIP, VHD, XZ and more. Complete file management Easily find, open, edit, move and share your files, whether they are on your computer, network or cloud service. Protect your privacy Easily encrypt files as you zip to secure information and data.
Create read-only PDFs and add watermarks to deter copying. Share anywhere Easily share large files by email, cloud services, social media and instant messaging.
Cozyroc Sftp Task Example
Quickly share links to your cloud files.