Topic "Need WinSCP to sync files based on creation date"

Author Message
c_reins

Guest


Hi, I'm using WinSCP version 4.2.9 with Windows XP. I need to know whether WinSCP can synchronize files based on file creation date. I need it to sync all files and ignore ones older than 1 month.

Any help would be greatly appreciated.
Advertisements
R_Ricks

Guest


To clarify,

our automated script is having two simultaneous issues:

1. we are having the time stamp file issues as according to the faq: http://winscp.net/eng/docs/faq_synchronize

2. we are also having the buffer overflow issues as per this post: http://winscp.net/forum/viewtopic.php?t=6375

We call winscp script file through windows batch, and so far have not found any good resolution to this problem. Any hints would be great
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
c_reins wrote:
Hi, I'm using WinSCP version 4.2.9 with Windows XP. I need to know whether WinSCP can synchronize files based on file creation date. I need it to sync all files and ignore ones older than 1 month.

No there no such option.
_________________
Martin Prikryl
Guest




Don't know if this should be a new topic or not, it's related based on based on "creation date".

When WinSCP copies files, it can & does sync the "modified" date, but the "creation" date is changed to the time the file was transferred/copied. I know this is "standard behavior" for Windows (it loses timestamps all the time when copying), but it's wrong.

Can I ask for a "no, really, preserve EVERYTHING" option? I want to copy/sync files between computers & not lose anything. I mean anything: Not lose timestamps due to "DST" issues. Not lose the "creation" date. Not lose anything. I mean for file AND dirs. Not sure how "Dropbox" works, but if it syncs all timestamps, then like that...otherwise, WinSCP can be the first to "do it right".

Also, with Win7/Vista...there are like a million "other" date columns you can display, not sure if you can set/sync those too, but that would be good.

If you don't wanna write this yourself (although that would probably be easier), can I ask for the option of having "pre-copy" & "post-copy" commands? Some command I can run on the local &/or remote side before & after the copy. Then I could write a program to retrieve the timestamps & then set them on the other side. I'd need a way to transfer the output of the command from one side to the other tho (temp file or pipe).

Like...

    Pre-copy command: timestamps-get.exe $file-or-dir-being-copied
    [ ] Dest-side command [x] Capture stdout

    Post-copy command: timestamps-set.exe
    [x] Dest-side command [x] Send Pre-copy command's stdout to stdin
...I hope that example is clear enough. Specify a program that gets timestamps from source side of copy, transfer info over stdout/stdin to other side, then specify a program that sets timestamps on dest side of copy.

Actually, pre/post-copy commands would be useful, even if you did implement full timestamp preservation internally.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Thanks for your post.

Pre/post copy commands are requested already:
http://winscp.net/tracker/show_bug.cgi?id=500

I'll consider preserving of the other timestamps. Though I'm not yet convinced it is the right thing to do.
_________________
Martin Prikryl
Guest




prikryl wrote:
Pre/post copy commands are requested already

...great! any ETA? any idea how difficult that is to write?

prikryl wrote:
Though I'm not yet convinced it is the right thing to do.

...I believe, at a minimum, it's the right thing to do as an option (even if off by default).

I believe when people copy/sync files between many computers, they want all the timestamps to stay in sync. Having the "Creation Date" be the time the file was 1st copied to / synced with that computer is not really useful. That's not when it was "Created". It was created on computer 1, synced with computer 2 & lost its real dates in the process.

I believe right or "wrong" the option should be added. Whether it's on by "default" could be determined in a poll. I'd like it on by default, just cuz it'd help people not run into this problem in the 1st place. Otherwise, they'll sync files, see the wrong timestamps & then come to the forum & find out there's an option to avoid this problem (but they only find out after their files are already "messed up").

I understand WinSCP didn't really create this problem & I can't believe there's no "good way" to copy/duplicate a file/dir & REALLY make an "exact" copy...even on the same computer. The only solution is RoboCopy or some other randomly-named command-line copy util from Microsoft (copy -> xcopy -> RoboCopy -> RichCopy). I believe normal click & drag Copy, in Windows, should keep all timestamps, but it doesn't.

Does everyone like losing timestamps when copying files? Is it just the "status quo"? Do people just "not notice"?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Quote:
...great! any ETA? any idea how difficult that is to write?

I never promise any dates, sorry.
_________________
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