Topic "check whether new file has been uploaded in winSCP folder"

Author Message
Guest




i have scheduled a window service to run every 3 minutes to process files uploading in winSCP folder.
now the steps used in the service is
1) copying remote file to local folder
2) process the files from local folder.
3) delete file from local folder.

now suppose a new file is being uploaded when the service is in step 2,

then what happens here is the new file which is uploaded is deleted in step 3.

is there any way to stop this.
Guest




step 3 is delete remote files from remote folder
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Simple solution:
0) Move the remote files to temp remote folder to isolate files you are working with.

Complex solution:
Use XML logging to find out what files were downloaded in step 1) and delete only those files in step 3)
https://winscp.net/eng/docs/logging_xml
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License