Bug in WinSCP using "time" as synchronize (Nothing to synchronize)

Advertisement

Nerea_2020
Joined:
Posts:
1

Bug in WinSCP using "time" as synchronize (Nothing to synchronize)

Hi,

I think I discovered a bug in WinSCP (lastest version). Don't know why doesn't detect different time in one file (I think that ocurrs in more files).

Lets see the example:
winscp_new.com /command "open sftp://ftp_resources:XXXXXX@2.248.193.XXX" "option batch continue" "synchronize remote -delete -criteria=time E:\Software\Updates\Resources\Images /Images/" "bye" >>test2.txt
When we see what's inside the SFTP and the local, we see this:
sftp:
-rw-rw-rw- 0 root 122173 Feb 23 17:50:02 2021 952.jpg
-rw-rw-rw- 0 root 122173 Feb 23 17:50:02 2021 952.png
local path E:\Software\Updates\Resources\Images:
E:\Software\Updates\Resources\Images>dir *952*
Volume in drive E has no label.
Volume Serial Number is D4CA-9482

Directory of E:\Software\Updates\Resources\Images

02/17/2010 05:10 PM 13,384 952.jpg
02/17/2010 05:10 PM 13,384 952.png
2 File(s) 26,768 bytes
0 Dir(s) 353,492,889,600 bytes free
As you see the time is different and it is no synced al all.

test2.txt output:
Searching for host...
Connecting to host...
Authenticating...
Using username "ftp_resources".
Further authentication required
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Session started.
Active session: [1] ftp_resources@2.248.89.244
batch continue
Comparing...
Local 'E:\Software\Updates\Resources\Images' => Remote '/Images'
Nothing to synchronize.
If I use size instead of time, it works, so I think it is a problem with "time", they think that have the same date.

Any idea? Prolly it's a bug in WinSCP code. I have no idea what more to test.

Thank you!

Reply with quote

Advertisement

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

Re: Bug in WinSCP using "time" as synchronize (Nothing to synchronize)

The remote file is newer than the local one. In the default "synchronize" mode, WinSCP transfers newer files only. If you want to transfer older files to, you have to use "mirror" mode.
https://winscp.net/eng/docs/task_synchronize_full#mode

Add -mirror switch to your synchronize command
https://winscp.net/eng/docs/scriptcommand_synchronize#mirror

Reply with quote

Advertisement

You can post new topics in this forum