Transfer all new or newly modified files in the last x minutes

Advertisement

Pawan
Customer
Joined:
Posts:
8

Transfer all new or newly modified files in the last x minutes

Hi,

I want to upload recently modified/created files to my web server via FTP.

I have tried using the command below in a script:
put -resume -preservetime -filemask=>60N "C:\source\*.*" "/destination/"
Some files are transferred, some are not. This missed files that were modified in the last 60 minutes.

However, if I put the app into keepuptodate mode, all modified files are uploaded.

I can't really understand what I am doing wrong when I try to upload manually using a script. The log does not indicate anything and seems to exclude files that were in fact modified. I have attached a modified log file.

Can you please advise what I might be doing wrong.
Thanks!
  • winscp sample.log (28.63 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Transfer all new or newly modified files in the last x minutes

I do not see any "keepuptodate" in the log. Am I missing something?

Reply with quote

Pawan
Customer
Joined:
Posts:
8

I carried out the following steps:
  1. Ran following script:
    open ftp://mycredentials/
    put -resume -preservetime -filemask=>15N "C:\sourcefolder1\*.*" "/destinationfolder1/"
    get -resume -preservetime "/sourcefolder2/filename.csv" "C:\destinationfolder2\" 
    exit
    The log for this is in winscp 230317.log. The files created/modified were within the last 15 minutes.

  2. I then ran keepuptodate command by pressing Ctrl+U in the app.

    The log for this is in SLTUploadFiles 230317.log.
1. did not transfer the files, while 2. did.

Please advise what is wrong with the script.

Thanks!
  • SLTUploadFiles 230317.log (233.13 KB, Private file)
  • winscp 230317.log (72.96 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

In the winscp 230317.log log I see that the upload failed, because your server does not support "resuming", what conflicts with -resume switch. In general, you would not really use the -resume switch blindly. Remove it.

Reply with quote

Pawan
Customer

Thank you. That seemed to have worked. I clearly misunderstand the point of -resume. I thought it was a sensible measure to recover from a disconnection during a transfer.

Reply with quote

Advertisement

You can post new topics in this forum