Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Session.MoveFile to Preserve Directory Time Stamps

The timestamp of the moved directory should not change (if you move it within the same file system). But WinSCP does not control that anyhow. The server does. What server is that? What file system? What protocol? Post some logs (including directory listings before and after the move). Do you see the same behaviour in WinSCP GUI?
johnhamborg

Session.MoveFile to Preserve Directory Time Stamps

I am using Session.MoveFile archive all files that older than a certain date as an archival process. The issue I have is that while it does preserve the file time stamp, it does not preserve the directory timestamp.

Can you advise? The Session.MoveFile method only has 2 arguments From and To with no way to specify a transfer options variable.

I'd like to use $transferOptions.AddRawSettings("PreserveTimeDirs", "1") but that does not appear to be an available option for Session.MoveFile.

Thanks so much!