techguy1029
techguy1029

Reputation: 831

How to synchronize only timestamps with WinSCP?

I am trying to update only timestamps with WinSCP. I can't find many examples online so I am asking here.

synchronize timestamps -filemask=" | *.txt; *.log" "source" "target"

I have tried this command, but I keep getting an 'unknown option' message. I have tried -timestamps and variations of this with no luck.

Documentation doesn't have any examples. It mentions it can only work with SFTP so I am unsure if there is another parameter or switch to do that.

Upvotes: 1

Views: 331

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202360

The timestamp synchronization functionality is not directly available in WinSCP scripting.

But you can set raw configuration option Interface\SynchronizeParams using /rawconfig command-line parameter:

winscp.com /script=yourscript.txt /ini=nul /rawconfig Interface\SynchronizeParams=256

Then the following command will update remote timestamps, instead of remote files:

synchronize remote -filemask=" | *.txt; *.log" "source" "target"

(analogically for local)

Upvotes: 1

Related Questions