How to upload recently added files independently of last modification?

Advertisement

nihil
Guest

How to upload recently added files independently of last modification?

I try to upload/put files to a destination server every week. The destination server does not hold files forever. I need to upload new local files only (=new modification or newly added to local) but not those previously uploaded.
The -neweronly switch prevents to upload files already present in the remote folder.
How to upload files added since last week?
Switches -latest and -filemask and/or time constraints are not useful as they are operating on modification time. Newly added (copy to local) files pertain their original modification time and actualize the creation time and accessed time. A time constraints of '>7D' does not result in selection files modified last year but new to local folder.

Is it possible to refer to creation time (or last accessed time) in the time constraints?

Thanks for your help.

Reply with quote

Advertisement

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

Re: How to upload recently added files independently of last modification?

nihil wrote:

Is it possible to refer to creation time (or last accessed time) in the time constraints?
No it's not possible.

Reply with quote

Guest

Re: How to upload recently added files independently of last modification?

martin wrote:

nihil wrote:

Is it possible to refer to creation time (or last accessed time) in the time constraints?
No it's not possible.

Any suggestions to upload new files as part of a script - when new files include those recently added to local folder?

Reply with quote

martin
Site Admin
martin avatar

Re: How to upload recently added files independently of last modification?

It should be rather easy to write e.g. a PowerShell script that logs already uploaded files (to a text file) and the next time it uploads only files that are not in the log yet. You can call WinSCP .NET assembly from the PowerShell script.

Reply with quote

Advertisement

You can post new topics in this forum